From 70015c9c5f6b2dd22f83622bba25d64c6ee32510 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 09 Oct 2013 16:40:20 -0400 Subject: build: Make [ commands more safe and consistent. --- 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; \ -- cgit v0.9.1