Browse Source

- helpers: add script to get or update git repositories

master
vanhofen 6 years ago
parent
commit
a16efca58c
  1. 20
      helpers/get-git-source.sh

20
helpers/get-git-source.sh

@ -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…
Cancel
Save