From ad79fb5cbfe8c45d64fffe4d11f8d14636d61211 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Mon, 8 Apr 2024 19:15:39 +0400 Subject: [PATCH] Fix: return to previous directory in update_repo() --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 3dba315..cdf3719 100755 --- a/build.sh +++ b/build.sh @@ -29,9 +29,11 @@ update_repo () { if [ -e "$1" ] then echo "$1 exists, updating" - cd "$1" || return 3 + old=$(pwd) + cd "$1" || exit 3 git stash && git stash drop - git pull + git pull || exit 2 + cd "$old" || exit 3 else echo "$1 not found, cloning" clone "$2" "$1"