commit fb25f5f301530d3aa424aa98802f0875dd72fde5
parent 969e64040fb6db2d23ca19617fe9701ae98491a4
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 19 Dec 2021 15:52:52 +0300
apply-all.sh: simplified usage
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/autotools-patches/apply-all.sh b/contrib/autotools-patches/apply-all.sh
@@ -8,7 +8,8 @@
# Based on Debian SID baseline files as of December 2021.
#
-patchesdir="$(pwd)"
+patchesdir="$(dirname "$BASH_SOURCE")" || exit 2
+test -n "$patchesdir" || exit 2
patches=(
0003-Pass-various-flags-to-GCC.patch
@@ -23,7 +24,7 @@ patches=(
failed=( )
-cd ../.. || exit 1
+cd "${patchesdir}/../.." || exit 1
for patch in ${patches[@]}; do
patch -N -p1 --no-backup-if-mismatch -r - -i "${patchesdir}/${patch}" || failed+=("$patch")