From ce32eb8847bebb34240ae0c2d1f18b6f463086f3 Mon Sep 17 00:00:00 2001 From: spacewander Date: Tue, 16 Mar 2021 18:20:36 +0800 Subject: [PATCH] fix: should go back after cd --- patch/patch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patch/patch.sh b/patch/patch.sh index 03dc2c2..9f5b793 100755 --- a/patch/patch.sh +++ b/patch/patch.sh @@ -22,11 +22,12 @@ apply_patch() { ver="$4" dir="$root/bundle/$repo-$ver" - cd "$dir" || failed_to_cd "$dir" + pushd "$dir" || failed_to_cd "$dir" for patch in "$patch_dir/$repo"-*.patch; do echo "Start to patch $patch to $dir..." patch -p0 --verbose < "$patch" done + popd } if [[ $# != 1 ]]; then