summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-08-29 22:31:25 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-08-29 22:31:25 (EDT)
commit3b2c1818aed5fa119374f36c62cc74dc04c6dc7d (patch)
tree8a5db55e6c86771e04562f7d05b81acc2ad3530b
parent7cc3ecfbc6a3bb5403d065c0adaa4e4c0101b9b8 (diff)
downloadlibreboot-3b2c1818aed5fa119374f36c62cc74dc04c6dc7d.zip
libreboot-3b2c1818aed5fa119374f36c62cc74dc04c6dc7d.tar.gz
libreboot-3b2c1818aed5fa119374f36c62cc74dc04c6dc7d.tar.bz2
build script: don't use ls
-rwxr-xr-xbuild4
1 files changed, 2 insertions, 2 deletions
diff --git a/build b/build
index ac98513..829763e 100755
--- a/build
+++ b/build
@@ -27,7 +27,7 @@ mode="unknown"
option="unknown"
usage="./build mode option"
-availablemodes="$(ls ${build}/)"
+availablemodes="$(for mode in ${build}/*; do printf "%s\n" "${mode##*/}"; done)"
availableoptions="unknown" # unknown until the mode is determined
# User specified no or too few/many parameters
@@ -48,7 +48,7 @@ option="${2}"
shift 2
if [ -d "${build}/${mode}" ]; then
- availableoptions="$(ls ${build}/${mode}/)"
+ availableoptions="$(for option in ${build}/${mode}/*; do printf "%s\n" "${option##*/}"; done)"
if [ "${option}" = "list" ]; then
printf "Available options for '%s' are:\nall\n%s\n\n" "${mode}" "${availableoptions}"
elif [ -f "${build}/${mode}/${option}" ]; then