git_backup/targit2dir
2025-07-03 18:09:03 +08:00

15 lines
427 B
Bash
Executable file

#!/bin/bash
if [ ! -z "$1" ] && [ $1 == "-h" ]; then
echo "1st param: name of name.git.tar.gz "
echo "2nd param optional: dir of output"
echo "i.e.: targit2dir Photon"
elif [ -z "$1" ]; then
echo "1st param: name of name.git.tar.gz "
echo "2nd param optional: dir of output"
echo "i.e.: targit2dir Photon"
elif [ ! -z "$1" ] && [ ! -z "$2" ]; then
tar -xvzf $1.git.tar.gz -C $2
else
tar -xvzf $1.git.tar.gz
fi