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