vanhofen
6 years ago
1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
#!/bin/bash |
||||
|
# |
||||
|
# clone or pull an existing git repository |
||||
|
# |
||||
|
# (C) 2019 vanhofen |
||||
|
# License: WTFPLv2 |
||||
|
# |
||||
|
# parameters: |
||||
|
# * git URL |
||||
|
# * destination directory |
||||
|
# |
||||
|
GIT_URL="$1" |
||||
|
DEST="$2" |
||||
|
|
||||
|
if [ -d $DEST ]; then |
||||
|
cd $DEST |
||||
|
git pull || true |
||||
|
else |
||||
|
git clone $GIT_URL $DEST |
||||
|
fi |
Loading…
Reference in new issue