summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-11-17 14:22:41 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2020-11-20 14:48:14 +0000
commitc7d2206df335f04ffec877ce8017cdf77371436e (patch)
treed2df13b131be67cbdc133dc8aa0ea84f94489a46
parent51651ac67efc9ba91e0859f4512b8d224e953ba2 (diff)
downloadglib-c7d2206df335f04ffec877ce8017cdf77371436e.tar.gz
update-pcre: Use a subshell to avoid `cd ..`
Shellcheck warning SC2103. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r--glib/update-pcre/update.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/glib/update-pcre/update.sh b/glib/update-pcre/update.sh
index 0e558dd5c..69d7f8aa7 100644
--- a/glib/update-pcre/update.sh
+++ b/glib/update-pcre/update.sh
@@ -43,7 +43,8 @@ cd pcre
# the file and then distribute it with GRegex.
echo "Generating pcre_chartables.c"
cp -R "${PCRE}" tmp-build
-cd tmp-build
+(
+cd tmp-build || exit 1
./configure --enable-utf8 --enable-unicode-properties --disable-cpp > /dev/null
make pcre_chartables.c > /dev/null
cat > ../pcre_chartables.c << \EOF
@@ -52,7 +53,7 @@ cat > ../pcre_chartables.c << \EOF
*/
EOF
cat pcre_chartables.c >> ../pcre_chartables.c
-cd ..
+)
rm -R tmp-build
# Compiled C files.