20 lines
302 B
Bash
Executable file
20 lines
302 B
Bash
Executable file
#!/bin/sh -e
|
|
|
|
##
|
|
# variables
|
|
gitdir=$1
|
|
branch=$2
|
|
|
|
##
|
|
# main
|
|
set -x
|
|
umask u=rwX,g=rwX,o=
|
|
if [ -e "${gitdir}/.git" ]; then
|
|
cd "${gitdir}"
|
|
git pull --rebase origin "${branch}"
|
|
else
|
|
set +x
|
|
echo "[-] ${gitdir} is not a valid git repository."
|
|
echo "[-] Try 'portzap clone'"
|
|
exit 1
|
|
fi
|