summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-10-09 16:40:20 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-10-09 16:40:20 (EDT)
commit70015c9c5f6b2dd22f83622bba25d64c6ee32510 (patch)
treef5f5f4dd6fd1a820cabf072e94a0f9844360f17b
parentc2e990f07c61408b2bb34fa823bbc0c4e995f6f9 (diff)
build: Make [ commands more safe and consistent.
-rwxr-xr-xbuild12
1 files changed, 6 insertions, 6 deletions
diff --git a/build b/build
index 0fe2c04..34bcdf5 100755
--- a/build
+++ b/build
@@ -44,12 +44,12 @@ install: build
fi; \
rm -f "$${p}.data/usr/share/zoneinfo/$${src}"; \
link="$${src}" up=''; \
- while [ "$${link#*/}" != "$${link}" ] && \
- [ "$${link%%/*}" = "$${dest%%/*}" ]; do \
+ while [ x"$${link#*/}" != x"$${link}" ] && \
+ [ x"$${link%%/*}" = x"$${dest%%/*}" ]; do \
link="$${link#*/}"; \
dest="$${dest#*/}"; \
done; \
- while [ "$${link#*/}" != "$${link}" ]; do \
+ while [ x"$${link#*/}" != x"$${link}" ]; do \
link="$${link#*/}"; \
up="../$${up}"; \
done; \
@@ -68,12 +68,12 @@ install: build
$(tables))"; \
fi; \
link="$${src}" up=''; \
- while [ "$${link#*/}" != "$${link}" ] && \
- [ "$${link%%/*}" = "$${dest%%/*}" ]; do \
+ while [ x"$${link#*/}" != x"$${link}" ] && \
+ [ x"$${link%%/*}" = x"$${dest%%/*}" ]; do \
link="$${link#*/}"; \
dest="$${dest#*/}"; \
done; \
- while [ "$${link#*/}" != "$${link}" ]; do \
+ while [ x"$${link#*/}" != x"$${link}" ]; do \
link="$${link#*/}"; \
up="../$${up}"; \
done; \