unify _usage

This commit is contained in:
Tobias Powalowski 2024-08-01 12:39:49 +02:00
parent 06cff9f4a3
commit ad1fe84dcb
3 changed files with 3 additions and 8 deletions

View file

@ -1,10 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# archboot-restore-usbstick.sh - restore usbstick to FAT32
# by Tobias Powalowski <tpowa@archlinux.org>
# usage(exitvalue)
# outputs a usage message and exits with value
# archboot-restore-usbstick.sh - restore usbstick to FAT32
# by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_usage()
{

View file

@ -2,8 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# rsync-backup.sh - copy files recursivly with rsync
# by Tobias Powalowski <tpowa@archlinux.org>
# usage(exitvalue)
# outputs a usage message and exits with value
. /usr/lib/archboot/common.sh
_usage()
{

View file

@ -9,7 +9,7 @@ _usage () {
echo -e "\e[1m---------------------------------------------\e[m"
echo "Check on new packages and release new images to server."
echo ""
echo -e "usage: \e[1m${_BASENAME} run\e[m"
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
[[ -z "${1}" || "${1}" != "run" ]] && _usage