diff options
author | P. 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) |
commit | 70015c9c5f6b2dd22f83622bba25d64c6ee32510 (patch) | |
tree | f5f5f4dd6fd1a820cabf072e94a0f9844360f17b | |
parent | c2e990f07c61408b2bb34fa823bbc0c4e995f6f9 (diff) |
build: Make [ commands more safe and consistent.
-rwxr-xr-x | build | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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; \ |