add usage to cpio

This commit is contained in:
Tobias Powalowski 2024-08-01 10:45:08 +02:00
parent 4b96880c18
commit 6a580c30db
2 changed files with 15 additions and 17 deletions

View file

@ -7,7 +7,7 @@
. /usr/lib/archboot/common.sh . /usr/lib/archboot/common.sh
_usage() _usage()
{ {
echo -e "\e[1m\e[36mArchboot\e[m \e[1m- HWSIM\e[m" echo -e "\e[1m\e[36mArchboot\e[m\e[1m - HWSIM\e[m"
echo -e "\e[1m----------------\e[m" echo -e "\e[1m----------------\e[m"
echo "Create a simulated wireless SSID for testing purposes" echo "Create a simulated wireless SSID for testing purposes"
echo "with mac80211_hwsim module." echo "with mac80211_hwsim module."

View file

@ -3,25 +3,23 @@
# archboot-cpio.sh - modular tool for building an initramfs image # archboot-cpio.sh - modular tool for building an initramfs image
# optimized for size and speed # optimized for size and speed
# by Tobias Powalowski <tpowa@archlinux.org> # by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_CONFIG="" _CONFIG=""
_CPIO=/usr/lib/archboot/cpio/hooks _CPIO=/usr/lib/archboot/cpio/hooks
_GENERATE_IMAGE="" _GENERATE_IMAGE=""
_TARGET_DIR="" _TARGET_DIR=""
_usage() { _usage() {
cat <<EOF echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Cpio\e[m"
ARCHBOOT CPIO echo -e "\e[1m----------------\e[m"
------------- echo "Tool for creating an archboot initramfs image."
Tool for creating an archboot initramfs image. echo
echo " -h Display this message and exit"
-h Display this message and exit echo " -c <config> Use <config> file"
-c <config> Use <config> file echo " -g <path> Generate cpio image and write to specified <path>"
-g <path> Generate cpio image and write to specified <path> echo " -d <dir> Generate image into <dir>"
-d <dir> Generate image into <dir> echo
echo -e "Usage: \e[1m${_APPNAME} <options>\e[m"
usage: ${0##*/} <options>
EOF
exit 0 exit 0
} }