diff --git a/update-blog-mail.sh b/update-blog-mail.sh deleted file mode 100755 index 7f66a5c..0000000 --- a/update-blog-mail.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ -d /home/sjs/blog-mail ]]; then - cd /home/sjs/blog-mail - git clean -fq - git pull -fi - diff --git a/update-git-repo.sh b/update-git-repo.sh new file mode 100755 index 0000000..450158a --- /dev/null +++ b/update-git-repo.sh @@ -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 +