summaryrefslogtreecommitdiffstats
path: root/scripts/buildinstall
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-12-08 21:44:23 +0000
committerErik Troan <ewt@redhat.com>2000-12-08 21:44:23 +0000
commit404417bd357aeae3d38a4a676866cd9e8b4859d9 (patch)
treed5bd6e9bda2e3ba2427c82bcbcc064879ab633c8 /scripts/buildinstall
parent8667a3c44ba6451f79a2f91df6bf8cc80c898e75 (diff)
downloadanaconda-404417bd357aeae3d38a4a676866cd9e8b4859d9.tar.gz
anaconda-404417bd357aeae3d38a4a676866cd9e8b4859d9.tar.xz
anaconda-404417bd357aeae3d38a4a676866cd9e8b4859d9.zip
added better usage message
Diffstat (limited to 'scripts/buildinstall')
-rwxr-xr-xscripts/buildinstall12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall
index deb22468a..889aff8c8 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -1,5 +1,10 @@
#!/bin/bash
+usage() {
+ echo "Usage: buildinstall [--comp <component>] [--pkgorder <file>] <root>" >&2
+ exit 1
+}
+
COMPNAME=dist-7.0
while [ $# -gt 0 ]; do
@@ -14,8 +19,7 @@ while [ $# -gt 0 ]; do
;;
*)
if [ -n "$DIR" -o ! -d $1/RedHat/RPMS ]; then
- echo "Usage: buildinstall [--comp <component>] [--pkgorder <file>] <root>" >&2
- exit 1
+ usage
fi
DIR=$1
shift
@@ -23,6 +27,10 @@ while [ $# -gt 0 ]; do
esac
done
+if [ -z "$DIR" ]; then
+ usage
+fi
+
p=`cd $DIR; /bin/pwd`
BUILDINSTDIR=$p/buildinstall.tree.$$