Commit 9e9ff6e5 authored by Benoit Rat's avatar Benoit Rat Committed by Alessandro Rubini

build: support --help, support rebuilding one step only

parent 79e38916
......@@ -38,6 +38,37 @@ fi
export WRS_SCRIPTS_DIR=${WRS_BASE_DIR}/scripts
## Function that show a little help
showhelp() {
echo ""
echo "Usage: $0 [options]"
echo ""
echo "Building script which fetch and compile the software for the white rabbit switch"
echo ""
echo "Options:"
echo " --help Show this little message"
echo " --clean Remove all the previous configuration"
echo " --fetch Force fetching the new download files"
echo " --list List the different building steps"
echo " --step=[00-09] Perform one specific step"
echo ""
exit 0;
}
## Menu to select the function in case we have an argument
if [ -n "$1" ]; then
case "$1" in
--help) showhelp;;
--clean) rm -f $WRS_DONE_DIR/00*;;
--fetch) echo "To be done";;
--list) cd $WRS_DONE_DIR; ls 0*; exit 0;;
--step=0[0-9]) num=`echo $1 | sed -e 's/--step=//'`; rm -vf $WRS_DONE_DIR/${num}-*;;
*) showhelp;;
esac
fi
wrs_show_vars WRS_BASE_DIR WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR \
WRS_SCRIPTS_DIR WRS_DONE_DIR CROSS_COMPILE
......@@ -65,6 +96,9 @@ wrs_build_step () {
}
failed_step=false; # this is set to "true" but the wrs_build_step function
# Now build the stuff one step at a time, only if not already done.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment