make that update-git-repo.sh
This commit is contained in:
parent
21fb6ed948
commit
d69e8774ae
2 changed files with 12 additions and 8 deletions
|
|
@ -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
12
update-git-repo.sh
Executable 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
|
||||||
|
|
||||||
Loading…
Reference in a new issue