[Aboriginal] [PATCH] Check the user input about architecture
Alessio Igor Bogani
alessioigorbogani at gmail.com
Tue Jun 21 00:35:24 PDT 2011
# HG changeset patch
# User Alessio Igor Bogani <alessioigorbogani at gmail.com>
# Date 1308641684 -7200
# Node ID 67accb5d252602b3b2ad2d0b8aa6fd9a62c74030
# Parent d16057658651a27f2c9b99764367475f36285e2e
Check the user input about architecture
diff -r d16057658651 -r 67accb5d2526 build.sh
--- a/build.sh Sun Jun 19 21:51:42 2011 -0500
+++ b/build.sh Tue Jun 21 09:34:44 2011 +0200
@@ -32,15 +32,20 @@
# Start with some housekeeping stuff. If this script was run with no
# arguments, list available architectures out of sources/targets.
+source sources/utility_functions.sh || exit 1
+
+SUPPORTED_ARCHS=$(ls sources/targets)
+
if [ $# -ne 1 ]
then
echo "Usage: $0 TARGET"
echo "Supported architectures:"
- cd sources/targets
- ls
+ echo $SUPPORTED_ARCHS
exit 1
+else
+ is_in_list $1 `echo $SUPPORTED_ARCHS | tr " " ","` || dienow
fi
ARCH="$1"
More information about the Aboriginal
mailing list