summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Funk <juergen.funk_ml@cib.de>2019-11-18 10:33:13 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-11-23 00:11:43 +0100
commit288b8c5c60eb65231953bb43dc2629f32b39bdef (patch)
treee6669ab09f342b8e40135668fe7fb3e4a2ea7c37
parentAdd comment and pdb-only switch to symstore.sh (diff)
downloadcore-288b8c5c60eb65231953bb43dc2629f32b39bdef.tar.gz
core-288b8c5c60eb65231953bb43dc2629f32b39bdef.zip
symstore.sh: use logical operators for test statements
No need to spawn two subshells, test can do and/or logical ops itself. Change-Id: I2abba303383f9f0053515088d4fa32753a777a1d Reviewed-on: https://gerrit.libreoffice.org/83066 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rwxr-xr-xbin/symstore.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/symstore.sh b/bin/symstore.sh
index f37ea0f4e7a0..2f7ad2f77610 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -20,11 +20,11 @@ add_pdb()
}
# check preconditions
-if [ -z "${INSTDIR}" ] || [ -z "${WORKDIR}" ]; then
+if [ -z "${INSTDIR}" -o -z "${WORKDIR}" ]; then
echo "INSTDIR or WORKDIR not set - script expects calling inside buildenv"
exit 1
fi
-if [ ! -d "${INSTDIR}" ] || [ ! -d "${WORKDIR}" ]; then
+if [ ! -d "${INSTDIR}" -o ! -d "${WORKDIR}" ]; then
echo "INSTDIR or WORKDIR not present - script expects calling after full build"
exit 1
fi
@@ -84,7 +84,7 @@ rm -f "${TMPFILE}"
# Cleanup symstore, older revisions will be removed. Unless the
# .dll/.exe changes, the .pdb should be shared, so with incremental
# tinderbox several revisions should not be that space-demanding.
-if [ "${MAX_KEEP}" -gt 0 ] && [ -d "${SYM_PATH}/000Admin" ]; then
+if [ "${MAX_KEEP}" -gt 0 -a -d "${SYM_PATH}/000Admin" ]; then
to_remove=$(ls -1 "${SYM_PATH}/000Admin" | grep -v '\.txt' | grep -v '\.deleted' | sort | head -n "-${MAX_KEEP}")
for revision in $to_remove; do
symstore.exe del /i "${revision}" /s "$(cygpath -w "${SYM_PATH}")"