Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Leone <simo@archlinux.org>2007-10-17 00:52:53 -0500
committerSimo Leone <simo@archlinux.org>2007-10-24 02:05:32 -0500
commit4b62e904754f7dbf96c178f26d1bcc193d94a281 (patch)
treee1f09e60ce0b26cfd9142ca58008b1079bd57960
parent9a34024e57527a0a706ca39a6cd03239592c99f6 (diff)
Make usage message appear before root user check
This allows joe user to see the usage message without having to specify -h. Trivial. Signed-off-by: Simo Leone <simo@archlinux.org>
-rwxr-xr-xmkarchiso10
1 files changed, 5 insertions, 5 deletions
diff --git a/mkarchiso b/mkarchiso
index 097de00..c54a912 100755
--- a/mkarchiso
+++ b/mkarchiso
@@ -47,17 +47,17 @@ while getopts 'i:P:p:a:fvh' arg; do
esac
done
+shift $(($OPTIND - 1))
+echo "ARGS: $@"
+
+[ $# -le 1 ] && usage 1
+
# do UID checking here so someone can at least get usage instructions
if [ "$EUID" != "0" ]; then
echo "error: This script must be run as root."
exit 1
fi
-shift $(($OPTIND - 1))
-echo "ARGS: $@"
-
-[ $# -le 1 ] && usage 1
-
command_name="${1}"
case "${command_name}" in
install) work_dir="${2}" ;;