Files
2021-10-05 19:35:55 +02:00

18 lines
298 B
Bash

#!/bin/bash
operation="$1"
if [[ "$operation" == "-a" ]]
then
bsdtar -c -f documents.tar ~/Documents
elif [[ "$operation" == "-c" ]]
then
bsdtar -c -j -f documents.tar.bz2 ~/Documents
elif [[ "$operation" == "-x" ]]
then
bsdtar -x -f documents.tar*
else
echo "Invalid option"
exit 1
fi