make that update-git-repo.sh

This commit is contained in:
Sami Samhuri 2011-11-27 17:44:27 -08:00
parent 21fb6ed948
commit d69e8774ae
2 changed files with 12 additions and 8 deletions

View file

@ -1,8 +0,0 @@
#!/bin/bash
if [[ -d /home/sjs/blog-mail ]]; then
cd /home/sjs/blog-mail
git clean -fq
git pull
fi

12
update-git-repo.sh Executable file
View file

@ -0,0 +1,12 @@
#!/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