Added debug options.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2019-05-03 13:00:56 +02:00
parent cf772c9e40
commit 2942760a41

View file

@ -2,18 +2,21 @@
# FIXME: Add checks # FIXME: Add checks
# FIXME: Add logging # FIXME: Add logging
REPO="$PWD"; REPO=$(realpath "$PWD");
TARGET_DIR="$1"; TARGET_DIR="$1";
BRANCH="$2"; BRANCH="$2";
env
function perform_clone_or_pull { function perform_clone_or_pull {
target="$1"; target="$1";
echo "Checking out working copy to remote:$target" echo "Checking out working copy to remote: $target"
if [! -e "$target/.git" ]; then if [ ! -e "$target/.git" ]; then
git clone "$REPO" "$target"; git clone "$REPO" "$target";
fi fi
( (
cd "$target"; cd "$target";
echo "Working directory: $target"
git fetch git fetch
git checkout origin/$BRANCH git checkout origin/$BRANCH
) )