From 5e28e6b9ac66f85f1310b582755eb3ba51973a92 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 25 Dec 2016 01:17:46 +0100 Subject: [PATCH] Removed remaining git -C --- advanced/Scripts/update.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 9f9ea320..2abbca22 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -52,13 +52,18 @@ make_repo() { update_repo() { local directory="${1}" + local curdir + + curdir="${PWD}" + cd "${directory}" &> /dev/null || return 1 # Pull the latest commits # Stash all files not tracked for later retrieval - git -C "${directory}" stash --all --quiet + git stash --all --quiet # Force a clean working directory for cloning - git -C "${directory}" clean --force -d + git clean --force -d # Fetch latest changes and apply - git -C "${directory}" pull --quiet + git pull --quiet + cd "${curdir}" &> /dev/null || return 1 } getGitFiles() {