From 605d0ffea77ae1f260a5c6f315dbdf1355cc2f48 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sat, 3 Aug 2024 15:31:13 -0400 Subject: [PATCH] Cleanup help on mkstage4 --- mkstage4.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/mkstage4.sh b/mkstage4.sh index b6198a9..d6f05d7 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -35,19 +35,23 @@ optSeperateKernel=false function showHelp() { echo "Usage:" - echo "$(basename "$0") [-b -c -k -l -q] [-C ] [-s || -t ] [-e ] [-i ] [-- [additional-tar-options]]" + echo "$(basename "$0") [-b -c -k -l -q] [-C ] [-s || -t ] [-e ...] [-i ...] [-- [tar-opts]]" + echo "Position Arguments:" + echo " archive name to create with optional path" + echo " [tar-opts] additional options to pass to tar command" echo - echo "-b excludes boot directory" - echo "-c excludes some confidential files (currently only .bash_history and connman network lists)" - echo "-k separately save current kernel modules and src (creates smaller targetArchives and saves decompression time)" - echo "-l includes lost+found directory" - echo "-q activates quiet mode (no confirmation)" - echo "-C specify tar compression (default: ${optCompressType}, available: ${!compressAvail[*]})" - echo "-s makes archive of current system" - echo "-t makes archive of system located at the " - echo "-e an additional exclude directory (one dir one -e, do not use it with *)" - echo "-i an additional include. This has higher precedence than -e, -t, and -s" - echo "-h display this help message." + echo "Options:" + echo " -b excludes boot directory" + echo " -c excludes some confidential files (currently only .bash_history and connman network lists)" + echo " -k separately save current kernel modules and src (creates smaller targetArchives and saves decompression time)" + echo " -l includes lost+found directory" + echo " -q activates quiet mode (no confirmation)" + echo " -C specify tar compression (default: ${optCompressType}, available: ${!compressAvail[*]})" + echo " -s makes archive of current system" + echo " -t makes archive of system located at the " + echo " -e an additional exclude directory (one dir one -e, do not use it with *)" + echo " -i an additional include. This has higher precedence than -e, -t, and -s" + echo " -h display this help message." if [[ "$1" -ge 0 ]]; then exit "$1" @@ -106,6 +110,7 @@ while [[ $# -gt 0 ]]; do shift # remove saved arg done + # checks if run as root: #if [[ "$(id -u)" -ne 0 ]]; then # echo "$(basename "$0"): must run as root"