Compare commits

...

1 commit

Author SHA1 Message Date
350a6c5a76 Added debug options.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
2019-05-03 13:03:22 +02:00

View file

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