color output of quickinst and backup scripts

This commit is contained in:
Tobias Powalowski 2022-04-05 09:50:59 +02:00
parent f432fbdb0d
commit f7dd63f4cf
3 changed files with 26 additions and 19 deletions

View file

@ -7,13 +7,15 @@
APPNAME=$(basename "${0}") APPNAME=$(basename "${0}")
usage() usage()
{ {
echo "COPY MOUNTPOINTS:" echo -e "\033[1mWelcome to the \033[34mArchboot\033[0m \033[1m${APPNAME}:\033[0m"
echo -e "\033[1m----------------------------------------------------\033[0m"
echo -e "\033[1mCOPY MOUNTPOINTS:\033[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 "- For system copying start with mounted / and then invoke this script" echo -e "- For system copying start with mounted \033[1m/\033[0m and then invoke this script"
echo " for each additional mountpoint eg. /boot or /home." echo -e " for each additional mountpoint eg. \033[1m/boot\033[0m or \033[1m/home\033[0m."
echo "" echo ""
echo "usage: ${APPNAME} <oldmountpoint> <newmountpoint>" echo -e "usage: \033[1m${APPNAME} <oldmountpoint> <newmountpoint>\033[0m"
exit "$1" exit "$1"
} }

View file

@ -3,22 +3,25 @@
DESTDIR="${1}" DESTDIR="${1}"
usage() { usage() {
echo "quickinst <destdir>" echo -e "\033[1mWelcome to the \033[34mArchboot\033[0m \033[1mquickinstall installer:\033[0m"
echo echo -e "\033[1m-----------------------------------------------\033[0m"
echo -e "Usage:"
echo -e "\033[1mquickinst <destdir>\033[0m"
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 "First configure /etc/pacman.conf which repositories to use" echo -e "First configure \033[1m/etc/pacman.conf\033[0m which repositories to use"
echo "and set a mirror in /etc/pacman.d/mirrorlist" echo -e "and set a mirror in \033[1m/etc/pacman.d/mirrorlist\033[0m"
fi fi
echo echo
echo "Make sure you have all your filesystems mounted under <destdir>." echo -e "Make sure you have all your filesystems mounted under \033[1m<destdir>\033[0m."
echo "Then run this script to install all packages listed in /etc/archboot/defaults" echo -e "Then run this script to install all packages listed in \033[1m/etc/archboot/defaults\033[0m"
echo "to <destdir>." echo -e "to \033[1m<destdir>\033[0m."
echo echo
echo "Example:" echo "Example:"
echo " quickinst /mnt" echo -e " \033[1mquickinst /mnt\033[0m"
echo "" echo ""
exit 0 exit 0
} }

View file

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