Compare commits

...

16 commits

Author SHA1 Message Date
Tobias Powalowski
392bb69a10 add tesuite completion 2024-08-01 19:40:14 +02:00
Tobias Powalowski
0e52da72b2 fix missing - 2024-08-01 17:54:50 +02:00
Tobias Powalowski
ebd1529c09 update Archboot homepage 2024-08-01 13:26:40 +02:00
Tobias Powalowski
e6701c1d04 unify usage 2024-08-01 13:24:04 +02:00
Tobias Powalowski
cce1ba1433 unify usage 2024-08-01 13:18:27 +02:00
Tobias Powalowski
6ca9af02c6 fix - 2024-08-01 13:10:00 +02:00
Tobias Powalowski
4b18f23c9a update CHANGELOG 2024-08-01 12:42:00 +02:00
Tobias Powalowski
6affa025d7 unify _usage 2024-08-01 12:40:44 +02:00
Tobias Powalowski
ad1fe84dcb unify _usage 2024-08-01 12:39:49 +02:00
Tobias Powalowski
06cff9f4a3 correct to _usage 2024-08-01 12:37:22 +02:00
Tobias Powalowski
7c61bf1a4c correct to _usage 2024-08-01 12:36:17 +02:00
Tobias Powalowski
817af4aef7 correct to _usage 2024-08-01 12:34:52 +02:00
Tobias Powalowski
7e39ac8053 add usage and run parameter 2024-08-01 12:32:39 +02:00
Tobias Powalowski
2e653846aa add run parameter 2024-08-01 12:24:33 +02:00
Tobias Powalowski
405b332f7a add run parameter and unify usage message 2024-08-01 12:22:44 +02:00
Tobias Powalowski
e3db4b0166 unify usage 2024-08-01 12:06:34 +02:00
24 changed files with 121 additions and 62 deletions

View file

@ -1,7 +1,7 @@
On the road to 2024.08:
---
quickinst:
- updated usage information
Environment:
- updated and unified usage information in all scripts
---
Highlights 2024.07:
- kernel 6.10.x

View file

@ -3,12 +3,12 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check on missing binaries\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check On Missing Binaries\e[m"
echo "------------------------------------"
echo "This will check binaries from package, if they exist"
echo "and report missing to binary.log"
echo ""
echo -e "Usage: \e[1m\e${_BASENAME} <package>\e[m"
echo -e "Usage: \e[1m${_BASENAME} <package>\e[m"
exit 0
}
[[ -z "${1}" ]] && _usage

View file

@ -3,6 +3,7 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/bootloader.sh
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_SHIM=$(mktemp -d shim.XXX)
_SHIM32=$(mktemp -d shim32.XXX)
_SHIMAA64=$(mktemp -d shimaa64.XXX)

View file

@ -4,7 +4,18 @@
# sets bigger font on bigger display resolutions
# by Tobias Powalowski <tpowa@archlinux.org>
#
# wait for modules to initialize cmompletely
. /usr/lib/archboot/common.sh
_usage() {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Detect Big Screen\e[m"
echo -e "\e[1m----------------------------\e[m"
echo "Detect big screen on boot and change to bigger font afterwards."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_root_check
# wait for modules to initialize completely
udevadm wait --settle /dev/fb0
# get screen setting mode from /sys
_FB_SIZE="$(rg -o ':(.*)x' -r '$1' /sys/class/graphics/fb0/modes 2>/dev/null)"

View file

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

View file

@ -3,7 +3,7 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check not installed packages\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check Not Installed Packages\e[m"
echo -e "\e[1m---------------------------------------\e[m"
echo "Check the system for uninstalled packages with pacman."
echo ""

View file

@ -3,6 +3,7 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/qemu.sh
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_UBOOT=$(mktemp -d uboot.XXX)
_OVMF32=$(mktemp -d ovmf32.XXX)
_OVMF=$(mktemp -d ovmf.XXX)

View file

@ -1,19 +1,16 @@
#!/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()
{
echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[m \e[1m- RESTORE USB STICK:\e[m"
echo -e "\e[1m----------------------------------------\e[m"
echo -e "\e[1m\e[36mARCHBOOT\e[m \e[1m- Restore USB Stick\e[m"
echo -e "\e[1m----------------------------\e[m"
echo -e "This script restores an USB device to a \e[1mFAT32\e[m device."
echo -e "\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[m"
echo -e "\e[1m\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[m"
echo ""
echo -e "usage: \e[1m${_BASENAME} <device>\e[m"
echo -e "Usage: \e[1m${_BASENAME} <device>\e[m"
exit 0
}
##################################################

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

@ -1,8 +1,8 @@
#!/usr/bin/env bash
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Generate Secure Boot keys, MOK files\e[m"
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Generate Secure Boot Keys, MOK Files\e[m"
echo -e "\e[1m-----------------------------------------------\e[m"
echo "This script generates all needed keys for a Secure Boot setup."
echo -e "It will include the \e[1m2\e[m needed Microsoft certificates, in order"
@ -12,18 +12,18 @@ usage () {
echo -e "Usage: \e[1m${_BASENAME} -name=<your name> <directory>\e[m"
exit 0
}
[[ -z "${1}" || -z "${2}" ]] && usage
[[ -z "${1}" || -z "${2}" ]] && _usage
_DIR="${2}"
while [ $# -gt 0 ]; do
case ${1} in
-name=*|--name=*) NAME="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;;
-h|--h|?) usage ;;
case ${1} in
-name=*|--name=*) NAME="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;;
-h|--h|?) _usage ;;
esac
shift
shift
done
if [[ -z "${NAME}" ]]; then
echo "ERROR: no name specified"
usage
_usage
#shellcheck disable=2317
exit 1
fi
@ -71,7 +71,7 @@ EOF
echo "Finished: Keys created in ${_DIR}"
else
echo "ERROR: no directory specified"
usage
_usage
#shellcheck disable=2317
exit 1
fi

View file

@ -5,11 +5,11 @@
. /etc/archboot/server-update.conf
. /usr/lib/archboot/common.sh
_usage () {
echo -e "\e[1mUpdate archboot server with new images\e[m"
echo -e "\e[1m---------------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Update Server To New Image\e[m"
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
@ -32,7 +32,7 @@ for i in ${_SERVER_ARCH}; do
for k in ${_TRIGGER}; do
# if trigger successful, release new image to server
if rg -qw "${k}" "${i}"/var/log/pacman.log; then
archboot-"${i}"-server-release.sh || echo "Error: ${i} release!" >> error.log
archboot-"${i}"-server-release.sh run || echo "Error: ${i} release!" >> error.log
break
fi
done

View file

@ -13,7 +13,7 @@
. /usr/lib/archboot/update/plasma.sh
. /usr/lib/archboot/update/sway.sh
[[ -z "${1}" ]] && usage
[[ -z "${1}" ]] && _usage
while [ $# -gt 0 ]; do
case ${1} in
-u|--u|-update|--update) _D_SCRIPTS="1" ;;
@ -28,8 +28,8 @@ while [ $# -gt 0 ]; do
-custom-xorg|--custom-xorg) _CUSTOM_X="1" ;;
-custom-wayland|--custom-wayland) _CUSTOM_WAYLAND="1" ;;
-full-system|--full-system) _FULL_SYSTEM="1" ;;
-h|--h|-help|--help|?) usage ;;
*) usage ;;
-h|--h|-help|--help|?) _usage ;;
*) _usage ;;
esac
shift
done

View file

@ -12,6 +12,15 @@ _SHIM_AA64_RPM="aarch64/shim-aa64-${_SHIM_VERSION}-${_SHIM_RELEASE}.aarch64.rpm"
_ARCH_SERVERDIR="/${_PUB}/src/bootloader"
_GRUB_ISO="/usr/share/archboot/grub/archboot-iso-grub.cfg"
_usage() {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Bootloader\e[m"
echo -e "\e[1m---------------------\e[m"
echo "Upload bootloaders to archboot server."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
_grub_mkstandalone() {
#shellcheck disable=SC2086
${1} ${2} grub-mkstandalone -d "/usr/lib/grub/${_GRUB_ARCH}" -O "${_GRUB_ARCH}" \

View file

@ -7,7 +7,7 @@ _ISODIR="$(mktemp -d ISODIR.XXX)"
_BOOTLOADER="/usr/share/archboot/bootloader"
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} USB/CD Images\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} USB/CD Image\e[m"
echo -e "\e[1m--------------------------------------\e[m"
echo "This will create an archboot iso image."
echo ""

View file

@ -14,6 +14,15 @@ _UBOOT_URL="http://ftp.us.debian.org/debian/pool/main/u/u-boot"
_UBOOT_DEB="u-boot-qemu_${_UBOOT_VERSION}+${_UBOOT_RELEASE}.deb"
_ARCH_SERVERDIR="/${_PUB}/src/qemu"
_usage() {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Qemu\e[m"
echo -e "\e[1m---------------\e[m"
echo "Upload qemu files to archboot server."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
_prepare_files () {
# download packages from fedora server
echo "Downloading Fedora OVMF and Debian UBOOT..."

View file

@ -17,8 +17,8 @@ _CONFIG_LOCAL="${_ARCH}-local.conf"
_W_DIR="$(mktemp -u archboot-release.XXX)"
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create Archboot Release Image\e[m"
echo -e "\e[1m----------------------------------------\e[m"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create Release Images\e[m"
echo -e "\e[1m--------------------------------\e[m"
echo "This will create an archboot release image in <directory>."
echo "You can specify a certain <server> with an archboot repository."
echo ""

View file

@ -23,10 +23,11 @@ elif echo "${_BASENAME}" | rg -qw 'riscv64'; then
fi
_usage () {
echo "CREATE ${_CAP_ARCH} PACMAN CHROOT"
echo "-----------------------------"
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_CAP_ARCH} Pacman Container\e[m"
echo -e "\e[1m------------------------------------------\e[m"
echo "This will create the ${_ARCH} pacman container tarball."
echo "usage: ${_BASENAME} <build-directory>"
echo ""
echo -e "Usage: \e[1m${_BASENAME} <build-directory>\e[m"
exit 0
}

View file

@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
. /usr/lib/archboot/common.sh
. /usr/lib/archboot/server.sh
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_root_check
_container_check
if echo "${_BASENAME}" | rg -qw 'riscv64' || echo "${_BASENAME}" | rg -qw 'aarch64'; then

View file

@ -5,6 +5,15 @@
. /usr/lib/archboot/container.sh
_ISO_BUILD_DIR="$(mktemp -d "${_ISO_HOME_ARCH}"/server-release.XXX)"
_usage() {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Server Release\e[m"
echo -e "\e[1m-------------------------\e[m"
echo "Upload new image to archboot server."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
_update_pacman_container() {
if [[ "${_ARCH}" == "aarch64" ]]; then
_ARCH_DIR="${_PACMAN_AARCH64}"

View file

@ -27,7 +27,7 @@ _graphic_options() {
fi
}
usage () {
_usage () {
echo -e "\e[1mManage \e[36mArchboot\e[m\e[1m - Environment:\e[m"
echo -e "\e[1m------------------------------\e[m"
echo -e " \e[1m-help\e[m This message."

View file

@ -8,4 +8,4 @@ After=systemd-udev-trigger.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/detect-vconsole.sh
ExecStart=/usr/bin/detect-vconsole.sh run

View file

@ -1,3 +1,3 @@
Arch Linux - Archboot Home https://bit.ly/archboot-html 0
Arch Linux - Archboot Home https://archboot.com 0
Arch Linux - Wiki https://wiki.archlinux.org/ 0
Arch Linux - Installation guide https://wiki.archlinux.org/title/Installation_Guide 0

View file

@ -0,0 +1,24 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org>
_testsuite()
{
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
run)
return 0
;;
esac
case $cur in
*)
OPTS="run"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
esac
compopt -o bashdefault -o default
return 0
}
complete -F _testsuite testsuite

View file

@ -2,23 +2,23 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
_update()
{
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
-*)
return 0
;;
esac
case $cur in
*)
OPTS="$(update | rg '\-[a-z]' | choose 0 | sd '\x1B\[[0-9;]*[a-zA-Z]' '')"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
esac
compopt -o bashdefault -o default
return 0
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
-*)
return 0
;;
esac
case $cur in
*)
OPTS="$(update | rg '\-[a-z]' | choose 0 | sd '\x1B\[[0-9;]*[a-zA-Z]' '')"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
esac
compopt -o bashdefault -o default
return 0
}
complete -F _update update