update usage messages

This commit is contained in:
Tobias Powalowski 2023-04-24 07:02:39 +02:00
parent eef2df3867
commit f12d694790
6 changed files with 13 additions and 11 deletions

View file

@ -5,9 +5,10 @@ _APPNAME=${0##*/}
_usage () { _usage () {
echo "Check on missing binaries in archboot environment" echo "Check on missing binaries in archboot environment"
echo "-------------------------------------------------" echo "-------------------------------------------------"
echo "usage: ${_APPNAME} <package>"
echo "This will check binaries from package, if they exist" echo "This will check binaries from package, if they exist"
echo "and report missing to binary.txt" echo "and report missing to binary.txt"
echo ""
echo "usage: ${_APPNAME} <package>"
exit 0 exit 0
} }
[[ -z "${1}" ]] && _usage [[ -z "${1}" ]] && _usage

View file

@ -16,11 +16,11 @@ _usage()
echo -e " for each additional mountpoint eg. \e[1m/boot\e[m or \e[1m/home\e[m." echo -e " for each additional mountpoint eg. \e[1m/boot\e[m or \e[1m/home\e[m."
echo "" echo ""
echo -e "usage: \e[1m${_APPNAME} <oldmountpoint> <newmountpoint>\e[m" echo -e "usage: \e[1m${_APPNAME} <oldmountpoint> <newmountpoint>\e[m"
exit "$1" exit 0
} }
################################################## ##################################################
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
_usage 1 _usage
fi fi
_NEWMOUNTPOINT="${2}" _NEWMOUNTPOINT="${2}"
_OLDMOUNTPOINT="${1}" _OLDMOUNTPOINT="${1}"

View file

@ -30,11 +30,11 @@ ARCHBOOT CPIO
------------- -------------
Tool for creating archboot initramfs images. Tool for creating archboot initramfs images.
-c <config> Use config file -c <config> Use config file
-g <path> Generate cpio image and write to specified path -g <path> Generate cpio image and write to specified path
-h Display this message and exit -h Display this message and exit
-k <kernel> Use specified kernel -k <kernel> Use specified kernel
-d <dir> Write generated image into <dir> -d <dir> Write generated image into <dir>
usage: ${0##*/} <options> usage: ${0##*/} <options>
EOF EOF

View file

@ -14,6 +14,7 @@ _usage()
echo "with mac80211_hwsim module." echo "with mac80211_hwsim module."
echo "- wlan0 will be setup as the AP. Don't use for scanning!" echo "- wlan0 will be setup as the AP. Don't use for scanning!"
echo "- wlan1 will be setup for STATION mode. Use this for scanning for your AP." echo "- wlan1 will be setup for STATION mode. Use this for scanning for your AP."
echo ""
echo -e "usage: \e[1m${_APPNAME} <SSID>\e[m" echo -e "usage: \e[1m${_APPNAME} <SSID>\e[m"
exit 0 exit 0
} }

View file

@ -14,7 +14,7 @@ _usage()
echo -e "\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[m" echo -e "\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[m"
echo "" echo ""
echo -e "usage: \e[1m${_APPNAME} <device>\e[m" echo -e "usage: \e[1m${_APPNAME} <device>\e[m"
exit "1" exit 0
} }
################################################## ##################################################
[[ -z "${1}" ]] && _usage "$@" [[ -z "${1}" ]] && _usage "$@"

View file

@ -17,11 +17,11 @@ _usage()
echo -e "- \e[1m--numeric-ids\e[m option is invoked to \e[1mpreserve\e[m users" echo -e "- \e[1m--numeric-ids\e[m option is invoked to \e[1mpreserve\e[m users"
echo "" echo ""
echo -e "usage: \e[1m${_APPNAME} <backupdir> <backupdestination>\e[m" echo -e "usage: \e[1m${_APPNAME} <backupdir> <backupdestination>\e[m"
exit "$1" exit 0
} }
################################################## ##################################################
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
_usage 1 _usage
fi fi
_BACKUPDESTINATION="${2}" _BACKUPDESTINATION="${2}"
_BACKUPDIR="${1}" _BACKUPDIR="${1}"