From 8a927576ec990972193b891c730f8b24d2f55ab3 Mon Sep 17 00:00:00 2001 From: supermerill Date: Sat, 21 Aug 2021 14:07:57 +0200 Subject: [PATCH] update BuildLinux to display usage if no options --- BuildLinux.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/BuildLinux.sh b/BuildLinux.sh index 0107695d9..189b08914 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -3,7 +3,7 @@ export ROOT=`pwd` export NCORES=`nproc --all` - +unset name while getopts ":dsiuh" opt; do case ${opt} in u ) @@ -30,6 +30,18 @@ while getopts ":dsiuh" opt; do esac done +if [ $OPTIND -eq 1 ] +then + echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s]" + echo " -i: Generate appimage" + echo " -d: build deps" + echo " -s: build slic3r" + echo " -u: only update clock & dependency packets (need sudo)" + echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" + echo " and then './BuildLinux.sh -dsi'" + exit 0 +fi + # mkdir build if [ ! -d "build" ] then