Initial commit

This commit is contained in:
Les De Ridder 2016-05-04 23:03:24 +00:00
commit 0eca44d9c2
4 changed files with 23 additions and 0 deletions

16
bootstrap.fish Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/fish
set scriptdir (dirname (status --current-filename))
source $scriptdir/config.fish
if test -d $subvoldir
echo "Backup directory already exists, aborting..."
exit
end
mkdir $subvoldir
for subvol in (eval $scriptdir/get-subvols.fish)
echo $subvol
end

2
clean-names.fish Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/fish
sed 's/\//-/g'

3
config.fish Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/fish
set subvoldir "/var/backups/subvols"

2
get-subvols.fish Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/fish
cat /etc/fstab | grep subvol | sed 's/.*subvol=//;s/)//;s/\t\| \|0//g'