mirror of
https://github.com/erenfro/gen2stage4.git
synced 2024-11-13 02:38:57 -05:00
Cleanup help on mkstage4
This commit is contained in:
parent
7b94bae02f
commit
605d0ffea7
1 changed files with 17 additions and 12 deletions
29
mkstage4.sh
29
mkstage4.sh
|
@ -35,19 +35,23 @@ optSeperateKernel=false
|
|||
|
||||
function showHelp() {
|
||||
echo "Usage:"
|
||||
echo "$(basename "$0") [-b -c -k -l -q] [-C <type>] [-s || -t <target>] [-e <exclude*>] [-i <include>] <archivename> [-- [additional-tar-options]]"
|
||||
echo "$(basename "$0") [-b -c -k -l -q] [-C <type>] [-s || -t <target>] [-e <exclude>...] [-i <include>...] <archive> [-- [tar-opts]]"
|
||||
echo "Position Arguments:"
|
||||
echo " <archive> 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 <type> specify tar compression (default: ${optCompressType}, available: ${!compressAvail[*]})"
|
||||
echo "-s makes archive of current system"
|
||||
echo "-t <path> makes archive of system located at the <path>"
|
||||
echo "-e <exclude> an additional exclude directory (one dir one -e, do not use it with *)"
|
||||
echo "-i <include> 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 <type> specify tar compression (default: ${optCompressType}, available: ${!compressAvail[*]})"
|
||||
echo " -s makes archive of current system"
|
||||
echo " -t <path> makes archive of system located at the <path>"
|
||||
echo " -e <exclude> an additional exclude directory (one dir one -e, do not use it with *)"
|
||||
echo " -i <include> 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"
|
||||
|
|
Loading…
Reference in a new issue