Skip to content

Commit

Permalink
add some sort of excuse for a usage display
Browse files Browse the repository at this point in the history
  • Loading branch information
anttikantee committed Jun 20, 2015
1 parent cc0395d commit 24a8810
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions build-rr.sh
Expand Up @@ -31,6 +31,19 @@ die ()
exit 1
}

helpme ()
{

echo "Usage: $0 [-s srcdir] [-q] hw|xen [-- buildrump.sh options]"
printf "\t-s: specify alternative src-netbsd location (expert-only)\n"
printf "\t-q: quiet(er) build. option maybe be specified twice.\n\n"
printf "buildrump.sh options are passed to buildrump.sh (expert-only)\n"
printf "\n"
printf "The toolchain is picked up from the environment. See the\n"
printf "rumprun wiki for more information.\n"
exit 1
}

set -e

# defaults
Expand Down Expand Up @@ -61,14 +74,14 @@ parseargs ()
'q')
BUILD_QUIET=${BUILD_QUIET:=-}q
;;
'?')
echo HELP!
'h'|'?')
helpme
exit 1
esac
done
shift $((${OPTIND} - 1))

[ $# -gt 0 ] || die Need platform argument
[ $# -gt 0 ] || helpme

platform=$1
export PLATFORMDIR=platform/${platform}
Expand Down

0 comments on commit 24a8810

Please sign in to comment.