mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
color output of quickinst and backup scripts
This commit is contained in:
parent
f432fbdb0d
commit
f7dd63f4cf
3 changed files with 26 additions and 19 deletions
|
@ -7,13 +7,15 @@
|
|||
APPNAME=$(basename "${0}")
|
||||
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 " using tar utility."
|
||||
echo "- For system copying start with mounted / and then invoke this script"
|
||||
echo " for each additional mountpoint eg. /boot or /home."
|
||||
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 ""
|
||||
echo "usage: ${APPNAME} <oldmountpoint> <newmountpoint>"
|
||||
echo -e "usage: \033[1m${APPNAME} <oldmountpoint> <newmountpoint>\033[0m"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
|
|
@ -3,22 +3,25 @@
|
|||
DESTDIR="${1}"
|
||||
|
||||
usage() {
|
||||
echo "quickinst <destdir>"
|
||||
echo
|
||||
echo -e "\033[1mWelcome to the \033[34mArchboot\033[0m \033[1mquickinstall installer:\033[0m"
|
||||
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 "media manually than go through the routines in the setup script."
|
||||
echo
|
||||
if ! [[ -e "${LOCAL_DB}" ]]; then
|
||||
echo "First configure /etc/pacman.conf which repositories to use"
|
||||
echo "and set a mirror in /etc/pacman.d/mirrorlist"
|
||||
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"
|
||||
fi
|
||||
echo
|
||||
echo "Make sure you have all your filesystems mounted under <destdir>."
|
||||
echo "Then run this script to install all packages listed in /etc/archboot/defaults"
|
||||
echo "to <destdir>."
|
||||
echo -e "Make sure you have all your filesystems mounted under \033[1m<destdir>\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<destdir>\033[0m."
|
||||
echo
|
||||
echo "Example:"
|
||||
echo " quickinst /mnt"
|
||||
echo -e " \033[1mquickinst /mnt\033[0m"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
|
|
@ -7,15 +7,17 @@
|
|||
APPNAME=$(basename "${0}")
|
||||
usage()
|
||||
{
|
||||
echo "RSYNC BACKUP:"
|
||||
echo "- Copy backupdir to backupdestination using rsync."
|
||||
echo -e "\033[1mWelcome to the \033[34mArchboot\033[0m \033[1m${APPNAME}:\033[0m"
|
||||
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 "- For system backup start with full mounted system and then invoke this script"
|
||||
echo " with system's root directory as backupdir."
|
||||
echo " - excluded directories are /dev /tmp /proc /sys /run /mnt /media /lost+found"
|
||||
echo " - --numeric-ids option is invoked to preserve users"
|
||||
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 ""
|
||||
echo "usage: ${APPNAME} <backupdir> <backupdestination>"
|
||||
echo -e "usage: \033[1m${APPNAME} <backupdir> <backupdestination>\033[0m"
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue