Fix shellcheck

This commit is contained in:
Torjus Håkestad 2024-06-02 22:23:36 +02:00
parent 80e9cd487a
commit b1b6f77ca7

View File

@ -8,10 +8,13 @@ let
pkgs.systemd pkgs.systemd
]; ];
text = '' text = ''
if [ "$#" -ne 1 ]; then
echo "Need exactly one argument, the path to backup.";
exit 1;
fi
echo "Starting backup."; echo "Starting backup.";
path="$(systemd-escape -u --path ''${1})"; path="$(systemd-escape -u --path \"$1\")";
restic backup "$path"; restic backup "$path";
restic forget -d 7 -w 4 -m 6 --keep-within 1d --prune
''; '';
}; };
in in