cat ../log/changes
}
-while getopts 'd' o "$@"; do
+usage () {
+ cat >&2 <<EOF
+$0 [opts] [cmd] [cmd-opts]
+
+options:
+
+ -d Enable debugging mode.
+
+commands:
+
+ archive-orig
+
+ build-all
+
+ -a Specify architectures
+ -b Bundle downloaded libraries in source package
+ -c Specify distributions
+ -d Enable cowbuilder debug hook
+ -j Build debs in parallel
+ -n Nightly build
+ -m [ quicktest ]
+ Choose custom list of modules to build
+ -s [ paranoid | reckless ]
+ Set FS bootstrap/build -j flags
+ -v Set version
+ -z Set compression level
+
+ build-debs <distro> <dsc-file> <architecture>
+
+ -d Enable cowbuilder debug hook
+
+ create-dbg-pkgs
+
+ create-dsc <distro> <orig-file>
+
+ -m [ quicktest ]
+ Choose custom list of modules to build
+ -s [ paranoid | reckless ]
+ Set FS bootstrap/build -j flags
+
+ create-orig <treeish>
+
+ -b Bundle downloaded libraries in source package
+ -n Nightly build
+ -v Set version
+ -z Set compression level
+
+EOF
+ exit 1
+}
+
+while getopts 'dh' o "$@"; do
case "$o" in
d) set -vx;;
+ h) usage;;
esac
done
shift $(($OPTIND-1))
-cmd="$1"
+cmd="$1"; [ -n "$cmd" ] || usage
shift
case "$cmd" in
archive-orig) archive_orig "$@" ;;
create-dbg-pkgs) create_dbg_pkgs ;;
create-dsc) create_dsc "$@" ;;
create-orig) create_orig "$@" ;;
+ *) usage ;;
esac