diff --git a/backup.nix b/backup.nix index 6f208da..d71b37e 100644 --- a/backup.nix +++ b/backup.nix @@ -28,10 +28,10 @@ let s3cfg="$2" ageRecipient="age17ckyc69njpryytc63ynn545jswyucg28k5xg3043g3j6q38dxqwq0wzhm2" - bucket="$(cat "$configFile" | grep 'bucket=' | sed 's/bucket \?= \?')" - prefix="$(cat "$configFile" | grep 'prefix=' | sed 's/prefix \?= \?')" + bucket="$(grep 'bucket=' < "$configFile" | sed 's/bucket \?= \?')" + prefix="$(grep 'prefix=' < "$configFile" | sed 's/prefix \?= \?')" - s3Dir="s3://$bucket/\$\{prefix}misskey-$(date --iso-8601)" + s3Dir="s3://$bucket/$\{prefix}misskey-$(date --iso-8601)" echo "Uploading backups to '$s3Dir'" function upload () {