scripts

custom scripts and utils
git clone git://git.pyratebeard.net/scripts.git
Log | Files | Refs | README

commit 7895d7d6246136d04f8b181ab9b3c551f94bd287
parent 3366da91b69c59cab7d99886dcd8fa9d93013a4f
Author: pyratebeard <root@pyratebeard.net>
Date:   Wed, 27 Nov 2024 12:11:49 +0000

feat(bin): tarsnap wrapper 'ratnaps'

Diffstat:
Abin/.local/bin/ratnaps | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/bin/.local/bin/ratnaps b/bin/.local/bin/ratnaps @@ -0,0 +1,13 @@ +#!/bin/sh + +# Set up archive name +computer=$(uname -n | awk -F. '{print $1}') +now=$(date +%Y%m%d) +name=${computer}-${now} +dirs="$@" + +# Create an archive +/usr/bin/tarsnap -c \ + -f "${name}" \ + "${dirs}" +