replace 033 with e

This commit is contained in:
Tobias Powalowski 2023-02-07 19:35:34 +01:00
parent 249c2e889a
commit d1dce3d1b8
7 changed files with 56 additions and 56 deletions

View file

@ -8,14 +8,14 @@
_APPNAME=$(basename "${0}") _APPNAME=$(basename "${0}")
_usage() _usage()
{ {
echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m\033[1m - COPY MOUNTPOINT:\033[0m" echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m\e[1m - COPY MOUNTPOINT:\e[0m"
echo -e "\033[1m--------------------------------------\033[0m" echo -e "\e[1m--------------------------------------\e[0m"
echo "- Copy mountpoint recursivly from one mountpoint to an other one," echo "- Copy mountpoint recursivly from one mountpoint to an other one,"
echo " using tar utility." echo " using tar utility."
echo -e "- For system copying start with mounted \033[1m/\033[0m and then invoke this script" echo -e "- For system copying start with mounted \e[1m/\e[0m and then invoke this script"
echo -e " for each additional mountpoint eg. \033[1m/boot\033[0m or \033[1m/home\033[0m." echo -e " for each additional mountpoint eg. \e[1m/boot\e[0m or \e[1m/home\e[0m."
echo "" echo ""
echo -e "usage: \033[1m${_APPNAME} <oldmountpoint> <newmountpoint>\033[0m" echo -e "usage: \e[1m${_APPNAME} <oldmountpoint> <newmountpoint>\e[0m"
exit "$1" exit "$1"
} }
################################################## ##################################################

View file

@ -8,13 +8,13 @@
_APPNAME=$(basename "${0}") _APPNAME=$(basename "${0}")
_usage() _usage()
{ {
echo -e "\033[1mWelcome to \033[34marchboot's\033[0m \033[1mHWSIM:\033[0m" echo -e "\e[1mWelcome to \e[34marchboot's\e[0m \e[1mHWSIM:\e[0m"
echo -e "\033[1m---------------------------------------\033[0m" echo -e "\e[1m---------------------------------------\e[0m"
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."
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 -e "usage: \033[1m${_APPNAME} <SSID>\033[0m" echo -e "usage: \e[1m${_APPNAME} <SSID>\e[0m"
exit 0 exit 0
} }
[[ -z "${1}" ]] && _usage [[ -z "${1}" ]] && _usage
@ -26,4 +26,4 @@ systemctl restart iwd
sleep 2 sleep 2
iwctl device wlan0 set-property Mode ap iwctl device wlan0 set-property Mode ap
iwctl device wlan0 set-property Powered on iwctl device wlan0 set-property Powered on
iwctl ap wlan0 start "${1}" "12345678" && echo -e "\033[1mSSID:'${1}' with password '12345678' is online now.\033[0m" iwctl ap wlan0 start "${1}" "12345678" && echo -e "\e[1mSSID:'${1}' with password '12345678' is online now.\e[0m"

View file

@ -5,25 +5,25 @@ _DESTDIR="${1}"
. /usr/lib/archboot/installer/common.sh . /usr/lib/archboot/installer/common.sh
_usage() { _usage() {
echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m \033[1m- QUICKINST INSTALLER:\033[0m" echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m \e[1m- QUICKINST INSTALLER:\e[0m"
echo -e "\033[1m-------------------------------------------\033[0m" echo -e "\e[1m-------------------------------------------\e[0m"
echo -e "Usage:" echo -e "Usage:"
echo -e "\033[1mquickinst <destdir>\033[0m" echo -e "\e[1mquickinst <destdir>\e[0m"
echo "" echo ""
echo "This script is for users who would rather partition/mkfs/mount their target" echo "This script is for users who would rather partition/mkfs/mount their target"
echo "media manually than go through the routines in the setup script." echo "media manually than go through the routines in the setup script."
echo echo
if ! [[ -e "${_LOCAL_DB}" ]]; then if ! [[ -e "${_LOCAL_DB}" ]]; then
echo -e "First configure \033[1m/etc/pacman.conf\033[0m which repositories to use" echo -e "First configure \e[1m/etc/pacman.conf\e[0m which repositories to use"
echo -e "and set a mirror in \033[1m/etc/pacman.d/mirrorlist\033[0m" echo -e "and set a mirror in \e[1m/etc/pacman.d/mirrorlist\e[0m"
fi fi
echo echo
echo -e "Make sure you have all your filesystems mounted under \033[1m<destdir>\033[0m." echo -e "Make sure you have all your filesystems mounted under \e[1m<destdir>\e[0m."
echo -e "Then run this script to install all packages listed in \033[1m/etc/archboot/defaults\033[0m" echo -e "Then run this script to install all packages listed in \e[1m/etc/archboot/defaults\e[0m"
echo -e "to \033[1m<destdir>\033[0m." echo -e "to \e[1m<destdir>\e[0m."
echo echo
echo "Example:" echo "Example:"
echo -e " \033[1mquickinst /mnt\033[0m" echo -e " \e[1mquickinst /mnt\e[0m"
echo "" echo ""
exit 0 exit 0
} }
@ -80,12 +80,12 @@ else
fi fi
if ! _prepare_pacman; then if ! _prepare_pacman; then
echo -e "Pacman preparation \033[91mFAILED\033[0m." echo -e "Pacman preparation \e[91mFAILED\e[0m."
exit 1 exit 1
fi fi
_chroot_mount _chroot_mount
if ! _install_packages; then if ! _install_packages; then
echo -e "Package installation \033[91mFAILED\033[0m." echo -e "Package installation \e[91mFAILED\e[0m."
_chroot_umount _chroot_umount
exit 1 exit 1
fi fi
@ -93,21 +93,21 @@ _locale_gen
_chroot_umount _chroot_umount
echo echo
echo -e "\033[1mPackage installation complete.\033[0m" echo -e "\e[1mPackage installation complete.\e[0m"
echo echo
echo -e "Please install a \033[1mbootloader\033[0m. Edit the appropriate config file for" echo -e "Please install a \e[1mbootloader\e[0m. Edit the appropriate config file for"
echo -e "your loader. Please use \033[1m${_VMLINUZ}\033[0m as kernel image." echo -e "your loader. Please use \e[1m${_VMLINUZ}\e[0m as kernel image."
echo -e "Chroot into your system to install it:" echo -e "Chroot into your system to install it:"
echo -e " \033[1m# mount -o bind /dev ${_DESTDIR}/dev\033[0m" echo -e " \e[1m# mount -o bind /dev ${_DESTDIR}/dev\e[0m"
echo -e " \033[1m# mount -t proc none ${_DESTDIR}/proc\033[0m" echo -e " \e[1m# mount -t proc none ${_DESTDIR}/proc\e[0m"
echo -e " \033[1m# mount -t sysfs none ${_DESTDIR}/sys\033[0m" echo -e " \e[1m# mount -t sysfs none ${_DESTDIR}/sys\e[0m"
echo -e " \033[1m# chroot ${_DESTDIR} /bin/bash\033[0m" echo -e " \e[1m# chroot ${_DESTDIR} /bin/bash\e[0m"
echo echo
echo "Next step, initramfs setup:" echo "Next step, initramfs setup:"
echo -e "Edit your \033[1m/etc/mkinitcpio.conf\033[0m to fit your needs. After that run:" echo -e "Edit your \e[1m/etc/mkinitcpio.conf\e[0m to fit your needs. After that run:"
echo -e " \033[1m# mkinitcpio -p ${_KERNELPKG}\033[0m" echo -e " \e[1m# mkinitcpio -p ${_KERNELPKG}\e[0m"
echo echo
echo -e "Then \033[1mexit\033[0m your chroot shell, edit \033[1m${_DESTDIR}/etc/fstab\033[0m and \033[1mreboot\033[0m! " echo -e "Then \e[1mexit\e[0m your chroot shell, edit \e[1m${_DESTDIR}/etc/fstab\e[0m and \e[1mreboot\e[0m! "
exit 0 exit 0
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:

View file

@ -8,12 +8,12 @@
_APPNAME=$(basename "${0}") _APPNAME=$(basename "${0}")
_usage() _usage()
{ {
echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m \033[1m- RESTORE USB STICK:\033[0m" echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m \e[1m- RESTORE USB STICK:\e[0m"
echo -e "\033[1m----------------------------------------\033[0m" echo -e "\e[1m----------------------------------------\e[0m"
echo -e "This script restores an USB device to a \033[1mFAT32\033[0m device." echo -e "This script restores an USB device to a \e[1mFAT32\e[0m device."
echo -e "\033[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \033[0m" echo -e "\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[0m"
echo "" echo ""
echo -e "usage: \033[1m${_APPNAME} <device>\033[0m" echo -e "usage: \e[1m${_APPNAME} <device>\e[0m"
exit "1" exit "1"
} }
################################################## ##################################################
@ -23,15 +23,15 @@ if ! [[ ${UID} -eq 0 ]]; then
echo "ERROR: Please run as root user!" echo "ERROR: Please run as root user!"
exit 1 exit 1
fi fi
echo -e "\033[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${1} now! \033[0m" echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${1} now! \e[0m"
sleep 10 sleep 10
# clean partitiontable # clean partitiontable
echo -e "\033[1mRestoring USB STICK...\033[0m" echo -e "\e[1mRestoring USB STICK...\e[0m"
echo -e "\033[1mSTEP 1/3:\033[0m Cleaning partition table..." echo -e "\e[1mSTEP 1/3:\e[0m Cleaning partition table..."
dd if=/dev/zero of="${1}" bs=512 count=2048 dd if=/dev/zero of="${1}" bs=512 count=2048
wipefs -a "${1}" wipefs -a "${1}"
# create new MBR and partition on <DEVICE> # create new MBR and partition on <DEVICE>
echo -e "\033[1mSTEP 2/3:\033[0m Create new MBR and partitiontable..." echo -e "\e[1mSTEP 2/3:\e[0m Create new MBR and partitiontable..."
fdisk "${1}" <<EOF fdisk "${1}" <<EOF
n n
p p
@ -45,6 +45,6 @@ EOF
# wait for partitiontable to be resynced # wait for partitiontable to be resynced
sleep 5 sleep 5
# create FAT32 filesystem on <device-partition> # create FAT32 filesystem on <device-partition>
echo -e "\033[1mSTEP 3/3:\033[0m Create FAT32 filesystem..." echo -e "\e[1mSTEP 3/3:\e[0m Create FAT32 filesystem..."
mkfs.vfat -F32 "${1}"1 mkfs.vfat -F32 "${1}"1
echo -e "\033[1mFinished.\033[0m" echo -e "\e[1mFinished.\e[0m"

View file

@ -7,15 +7,15 @@
_APPNAME=$(basename "${0}") _APPNAME=$(basename "${0}")
_usage() _usage()
{ {
echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m\033[1m - RSYNC BACKUP:\033[0m" echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m\e[1m - RSYNC BACKUP:\e[0m"
echo -e "\033[1m-----------------------------------\033[0m" echo -e "\e[1m-----------------------------------\e[0m"
echo -e "- Copy \033[1mbackupdir\033[0m to \033[1mbackupdestination\033[0m using rsync." echo -e "- Copy \e[1mbackupdir\e[0m to \e[1mbackupdestination\e[0m using rsync."
echo -e "- For system backup, start with \033[1mfull\033[0m mounted system and then invoke this script" echo -e "- For system backup, start with \e[1mfull\e[0m mounted system and then invoke this script"
echo -e " with system's root directory as \033[1mbackupdir\033[0m." echo -e " with system's root directory as \e[1mbackupdir\e[0m."
echo -e "- \033[1mexcluded\033[0m directories are \033[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\033[0m" echo -e "- \e[1mexcluded\e[0m directories are \e[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\e[0m"
echo -e "- \033[1m--numeric-ids\033[0m option is invoked to \033[1mpreserve\033[0m users" echo -e "- \e[1m--numeric-ids\e[0m option is invoked to \e[1mpreserve\e[0m users"
echo "" echo ""
echo -e "usage: \033[1m${_APPNAME} <backupdir> <backupdestination>\033[0m" echo -e "usage: \e[1m${_APPNAME} <backupdir> <backupdestination>\e[0m"
exit "$1" exit "$1"
} }
################################################## ##################################################

View file

@ -2,16 +2,16 @@
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh . /usr/lib/archboot/common.sh
usage () { usage () {
echo -e "\033[1mGenerate Secure Boot keys,MOK files and backup existing keys:\033[0m" echo -e "\e[1mGenerate Secure Boot keys,MOK files and backup existing keys:\e[0m"
echo -e "\033[1m-------------------------------------------------------------\033[0m" echo -e "\e[1m-------------------------------------------------------------\e[0m"
echo "This script generates all needed keys for a Secure Boot setup." echo "This script generates all needed keys for a Secure Boot setup."
echo -e "It will include the \033[1m2\033[0m needed Microsoft certificates, in order" echo -e "It will include the \e[1m2\e[0m needed Microsoft certificates, in order"
echo "to avoid soft bricking of devices." echo "to avoid soft bricking of devices."
echo -e "Backup of your existing keys are put to \033[1mBACKUP\033[0m directory." echo -e "Backup of your existing keys are put to \e[1mBACKUP\e[0m directory."
echo "" echo ""
echo -e "\033[1m-Usage: -name= <directory>\033[0m" echo -e "\e[1m-Usage: -name= <directory>\e[0m"
echo "" echo ""
echo -e "\033[1m-PARAMETERS:\033[0m" echo -e "\e[1m-PARAMETERS:\e[0m"
echo " -name= your name to embed in the keys" echo " -name= your name to embed in the keys"
echo " -h This message." echo " -h This message."
exit 0 exit 0

View file

@ -33,7 +33,7 @@ while [ $# -gt 0 ]; do
done done
_archboot_check _archboot_check
_download_latest _download_latest
echo -e "\033[1mInformation:\033[0m Logging is done on \033[1m/dev/tty7\033[0m..." echo -e "\e[1mInformation:\e[0m Logging is done on \e[1m/dev/tty7\e[0m..."
_zram_initialize _zram_initialize
# Generate new environment and launch it with kexec # Generate new environment and launch it with kexec
if [[ -n "${_L_COMPLETE}" || -n "${_L_INSTALL_COMPLETE}" ]]; then if [[ -n "${_L_COMPLETE}" || -n "${_L_INSTALL_COMPLETE}" ]]; then