bin/update-git-repo.sh
2011-11-27 17:44:27 -08:00

12 lines
152 B
Bash
Executable file

#!/bin/bash
dir="$1"
if [[ -d "$1/.git" ]]; then
cd "$1"
git clean -fq
git pull
else
echo "error: $1 is not a git repo"
exit 1
fi