From d1dce3d1b8ebf153ae4d385a1f71ef53766ff006 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 7 Feb 2023 19:35:34 +0100 Subject: [PATCH] replace 033 with e --- usr/bin/archboot-copy-mountpoint.sh | 10 +++---- usr/bin/archboot-hwsim.sh | 8 +++--- usr/bin/archboot-quickinst.sh | 42 ++++++++++++++-------------- usr/bin/archboot-restore-usbstick.sh | 22 +++++++-------- usr/bin/archboot-rsync-backup.sh | 16 +++++------ usr/bin/archboot-secureboot-keys.sh | 12 ++++---- usr/bin/archboot-update-installer.sh | 2 +- 7 files changed, 56 insertions(+), 56 deletions(-) diff --git a/usr/bin/archboot-copy-mountpoint.sh b/usr/bin/archboot-copy-mountpoint.sh index 8e37a414f..726d94985 100755 --- a/usr/bin/archboot-copy-mountpoint.sh +++ b/usr/bin/archboot-copy-mountpoint.sh @@ -8,14 +8,14 @@ _APPNAME=$(basename "${0}") _usage() { - echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m\033[1m - COPY MOUNTPOINT:\033[0m" - echo -e "\033[1m--------------------------------------\033[0m" + echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m\e[1m - COPY MOUNTPOINT:\e[0m" + echo -e "\e[1m--------------------------------------\e[0m" echo "- Copy mountpoint recursivly from one mountpoint to an other one," echo " using tar utility." - echo -e "- For system copying start with mounted \033[1m/\033[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 system copying start with mounted \e[1m/\e[0m and then invoke this script" + echo -e " for each additional mountpoint eg. \e[1m/boot\e[0m or \e[1m/home\e[0m." echo "" - echo -e "usage: \033[1m${_APPNAME} \033[0m" + echo -e "usage: \e[1m${_APPNAME} \e[0m" exit "$1" } ################################################## diff --git a/usr/bin/archboot-hwsim.sh b/usr/bin/archboot-hwsim.sh index d1e876596..53d491bfc 100755 --- a/usr/bin/archboot-hwsim.sh +++ b/usr/bin/archboot-hwsim.sh @@ -8,13 +8,13 @@ _APPNAME=$(basename "${0}") _usage() { - echo -e "\033[1mWelcome to \033[34marchboot's\033[0m \033[1mHWSIM:\033[0m" - echo -e "\033[1m---------------------------------------\033[0m" + echo -e "\e[1mWelcome to \e[34marchboot's\e[0m \e[1mHWSIM:\e[0m" + echo -e "\e[1m---------------------------------------\e[0m" echo "Create a simulated wireless SSID for testing purposes" echo "with mac80211_hwsim module." 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 -e "usage: \033[1m${_APPNAME} \033[0m" + echo -e "usage: \e[1m${_APPNAME} \e[0m" exit 0 } [[ -z "${1}" ]] && _usage @@ -26,4 +26,4 @@ systemctl restart iwd sleep 2 iwctl device wlan0 set-property Mode ap 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" diff --git a/usr/bin/archboot-quickinst.sh b/usr/bin/archboot-quickinst.sh index 3d3ad0901..b36ff4a22 100755 --- a/usr/bin/archboot-quickinst.sh +++ b/usr/bin/archboot-quickinst.sh @@ -5,25 +5,25 @@ _DESTDIR="${1}" . /usr/lib/archboot/installer/common.sh _usage() { - echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m \033[1m- QUICKINST INSTALLER:\033[0m" - echo -e "\033[1m-------------------------------------------\033[0m" + echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m \e[1m- QUICKINST INSTALLER:\e[0m" + echo -e "\e[1m-------------------------------------------\e[0m" echo -e "Usage:" - echo -e "\033[1mquickinst \033[0m" + echo -e "\e[1mquickinst \e[0m" echo "" 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 if ! [[ -e "${_LOCAL_DB}" ]]; then - echo -e "First configure \033[1m/etc/pacman.conf\033[0m which repositories to use" - echo -e "and set a mirror in \033[1m/etc/pacman.d/mirrorlist\033[0m" + echo -e "First configure \e[1m/etc/pacman.conf\e[0m which repositories to use" + echo -e "and set a mirror in \e[1m/etc/pacman.d/mirrorlist\e[0m" fi echo - echo -e "Make sure you have all your filesystems mounted under \033[1m\033[0m." - echo -e "Then run this script to install all packages listed in \033[1m/etc/archboot/defaults\033[0m" - echo -e "to \033[1m\033[0m." + echo -e "Make sure you have all your filesystems mounted under \e[1m\e[0m." + echo -e "Then run this script to install all packages listed in \e[1m/etc/archboot/defaults\e[0m" + echo -e "to \e[1m\e[0m." echo echo "Example:" - echo -e " \033[1mquickinst /mnt\033[0m" + echo -e " \e[1mquickinst /mnt\e[0m" echo "" exit 0 } @@ -80,12 +80,12 @@ else fi if ! _prepare_pacman; then - echo -e "Pacman preparation \033[91mFAILED\033[0m." + echo -e "Pacman preparation \e[91mFAILED\e[0m." exit 1 fi _chroot_mount if ! _install_packages; then - echo -e "Package installation \033[91mFAILED\033[0m." + echo -e "Package installation \e[91mFAILED\e[0m." _chroot_umount exit 1 fi @@ -93,21 +93,21 @@ _locale_gen _chroot_umount echo -echo -e "\033[1mPackage installation complete.\033[0m" +echo -e "\e[1mPackage installation complete.\e[0m" echo -echo -e "Please install a \033[1mbootloader\033[0m. Edit the appropriate config file for" -echo -e "your loader. Please use \033[1m${_VMLINUZ}\033[0m as kernel image." +echo -e "Please install a \e[1mbootloader\e[0m. Edit the appropriate config file for" +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 " \033[1m# mount -o bind /dev ${_DESTDIR}/dev\033[0m" -echo -e " \033[1m# mount -t proc none ${_DESTDIR}/proc\033[0m" -echo -e " \033[1m# mount -t sysfs none ${_DESTDIR}/sys\033[0m" -echo -e " \033[1m# chroot ${_DESTDIR} /bin/bash\033[0m" +echo -e " \e[1m# mount -o bind /dev ${_DESTDIR}/dev\e[0m" +echo -e " \e[1m# mount -t proc none ${_DESTDIR}/proc\e[0m" +echo -e " \e[1m# mount -t sysfs none ${_DESTDIR}/sys\e[0m" +echo -e " \e[1m# chroot ${_DESTDIR} /bin/bash\e[0m" echo 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 " \033[1m# mkinitcpio -p ${_KERNELPKG}\033[0m" +echo -e "Edit your \e[1m/etc/mkinitcpio.conf\e[0m to fit your needs. After that run:" +echo -e " \e[1m# mkinitcpio -p ${_KERNELPKG}\e[0m" 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 # vim: set ts=4 sw=4 et: diff --git a/usr/bin/archboot-restore-usbstick.sh b/usr/bin/archboot-restore-usbstick.sh index 5e330c40f..77a7258f4 100755 --- a/usr/bin/archboot-restore-usbstick.sh +++ b/usr/bin/archboot-restore-usbstick.sh @@ -8,12 +8,12 @@ _APPNAME=$(basename "${0}") _usage() { - echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m \033[1m- RESTORE USB STICK:\033[0m" - echo -e "\033[1m----------------------------------------\033[0m" - echo -e "This script restores an USB device to a \033[1mFAT32\033[0m device." - echo -e "\033[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \033[0m" + echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m \e[1m- RESTORE USB STICK:\e[0m" + echo -e "\e[1m----------------------------------------\e[0m" + echo -e "This script restores an USB device to a \e[1mFAT32\e[0m device." + echo -e "\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE! \e[0m" echo "" - echo -e "usage: \033[1m${_APPNAME} \033[0m" + echo -e "usage: \e[1m${_APPNAME} \e[0m" exit "1" } ################################################## @@ -23,15 +23,15 @@ if ! [[ ${UID} -eq 0 ]]; then echo "ERROR: Please run as root user!" exit 1 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 # clean partitiontable -echo -e "\033[1mRestoring USB STICK...\033[0m" -echo -e "\033[1mSTEP 1/3:\033[0m Cleaning partition table..." +echo -e "\e[1mRestoring USB STICK...\e[0m" +echo -e "\e[1mSTEP 1/3:\e[0m Cleaning partition table..." dd if=/dev/zero of="${1}" bs=512 count=2048 wipefs -a "${1}" # create new MBR and partition on -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}" < -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 -echo -e "\033[1mFinished.\033[0m" +echo -e "\e[1mFinished.\e[0m" diff --git a/usr/bin/archboot-rsync-backup.sh b/usr/bin/archboot-rsync-backup.sh index 9ad45fa65..86ed3ec5d 100755 --- a/usr/bin/archboot-rsync-backup.sh +++ b/usr/bin/archboot-rsync-backup.sh @@ -7,15 +7,15 @@ _APPNAME=$(basename "${0}") _usage() { - echo -e "\033[1mWelcome to \033[36mARCHBOOT\033[0m\033[1m - RSYNC BACKUP:\033[0m" - echo -e "\033[1m-----------------------------------\033[0m" - echo -e "- Copy \033[1mbackupdir\033[0m to \033[1mbackupdestination\033[0m using rsync." - echo -e "- For system backup, start with \033[1mfull\033[0m mounted system and then invoke this script" - echo -e " with system's root directory as \033[1mbackupdir\033[0m." - echo -e "- \033[1mexcluded\033[0m directories are \033[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\033[0m" - echo -e "- \033[1m--numeric-ids\033[0m option is invoked to \033[1mpreserve\033[0m users" + echo -e "\e[1mWelcome to \e[36mARCHBOOT\e[0m\e[1m - RSYNC BACKUP:\e[0m" + echo -e "\e[1m-----------------------------------\e[0m" + echo -e "- Copy \e[1mbackupdir\e[0m to \e[1mbackupdestination\e[0m using rsync." + 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 \e[1mbackupdir\e[0m." + echo -e "- \e[1mexcluded\e[0m directories are \e[1m/dev /tmp /proc /sys /run /mnt /media /lost+found\e[0m" + echo -e "- \e[1m--numeric-ids\e[0m option is invoked to \e[1mpreserve\e[0m users" echo "" - echo -e "usage: \033[1m${_APPNAME} \033[0m" + echo -e "usage: \e[1m${_APPNAME} \e[0m" exit "$1" } ################################################## diff --git a/usr/bin/archboot-secureboot-keys.sh b/usr/bin/archboot-secureboot-keys.sh index 8ed786231..f8dfc0805 100755 --- a/usr/bin/archboot-secureboot-keys.sh +++ b/usr/bin/archboot-secureboot-keys.sh @@ -2,16 +2,16 @@ # created by Tobias Powalowski . /usr/lib/archboot/common.sh usage () { - echo -e "\033[1mGenerate Secure Boot keys,MOK files and backup existing keys:\033[0m" - echo -e "\033[1m-------------------------------------------------------------\033[0m" + echo -e "\e[1mGenerate Secure Boot keys,MOK files and backup existing keys:\e[0m" + echo -e "\e[1m-------------------------------------------------------------\e[0m" 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 -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 -e "\033[1m-Usage: -name= \033[0m" + echo -e "\e[1m-Usage: -name= \e[0m" 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 " -h This message." exit 0 diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index dc2b8db69..b1075cc48 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -33,7 +33,7 @@ while [ $# -gt 0 ]; do done _archboot_check _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 # Generate new environment and launch it with kexec if [[ -n "${_L_COMPLETE}" || -n "${_L_INSTALL_COMPLETE}" ]]; then