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

15 lines
357 B
Bash
Executable file

#!/bin/bash
if [ ! -z "$1" ] && [ $1 == "-h" ]; then
echo "1st param optional: dir of output"
echo "i.e.: targit2dir <dir>"
elif [ -z "$1" ]; then
echo "1st param optional: dir of output"
echo "i.e.: targit2dir <dir>"
elif [ ! -z "$1" ]; then
#echo $1
ls *.git.tar.gz | xargs -l tar -C $1 -xvzf
else
ls *.git.tar.gz | xargs -l tar -xvzf
fi