Skip to content

Commit fb25f5f

Browse files
committed
apply-all.sh: simplified usage
1 parent 969e640 commit fb25f5f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

contrib/autotools-patches/apply-all.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# Based on Debian SID baseline files as of December 2021.
99
#
1010

11-
patchesdir="$(pwd)"
11+
patchesdir="$(dirname "$BASH_SOURCE")" || exit 2
12+
test -n "$patchesdir" || exit 2
1213

1314
patches=(
1415
0003-Pass-various-flags-to-GCC.patch
@@ -23,7 +24,7 @@ patches=(
2324

2425
failed=( )
2526

26-
cd ../.. || exit 1
27+
cd "${patchesdir}/../.." || exit 1
2728

2829
for patch in ${patches[@]}; do
2930
patch -N -p1 --no-backup-if-mismatch -r - -i "${patchesdir}/${patch}" || failed+=("$patch")

0 commit comments

Comments
 (0)