Rewrite create-archive

This commit is contained in:
Jeffrey Serio 2023-09-01 07:15:45 -05:00
parent 293b5aad12
commit ef32c081d8

View File

@ -2,7 +2,7 @@
# Create a tarball from given directory.
archive_name="$1.tar.gz"
archive_name=${archive_name/\//}
tar cvfz "$archive_name" "$1"
echo "Created archive $archive_name"
dir_name="$1"
archive_name="${dir_name}-$(date '+%Y%m%d').tar.gz"
tar cvfz "$archive_name" "$1" && \
echo "Created archive $archive_name"