zerog

[archived] simple Parabola GNU/Linux post-install script
git clone git://git.hanetzok.net/zerog
Log | Files | Refs | README | LICENSE

commit b402853df949b71cb96cfd2f7803e772e9763c76
parent 13901c139b99f8a448120e53d60cc43d338761cb
Author: Markus Hanetzok <markus@hanetzok.net>
Date:   Wed, 10 Aug 2022 07:40:14 +0200

Add logging for successful operations

In order to allow for better troubleshooting, the script will write
every function name that returned 0 to the log, in addition to errors
and warnings.

Diffstat:
Mzerog | 30+++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/zerog b/zerog @@ -12,6 +12,10 @@ logfile="/tmp/zerog.log" ### FUNCTIONS ### +task_complete() { + printf "COMPLETE: $1 completed!\n" > "$logfile" +} + warning() { printf "WARNING: $1\n" >> "$logfile" } @@ -89,18 +93,30 @@ follow_up() { printf "###########################\n########## ZEROG ##########\n###########\ ################\n" -prepare || error "Please make sure that you have a working internet connection\ - and you run ZEROG with sudo!" +prepare && + task_complete "prepare()" || + error "Please make sure that you have a working internet connection and \ +you run ZEROG with sudo!" -install_programs || error "Error during installation from progs.list" +install_programs && + task_complete "install_programs()" || + error "Error during installation from progs.list" -get_dotfiles || error "Could not install dotfiles" +get_dotfiles && + task_complete "get_dotfiles()" || + error "Could not install dotfiles" -suckless || error "Could not install suckless programs" +suckless && + task_complete "suckless()" || + error "Could not install suckless programs" -install_libxft-bgra || error "Could not install libxft-bgra" +install_libxft-bgra && + task_complete "install_libxft-bgra()" || + error "Could not install libxft-bgra" -follow_up || error "Follow up function failed" +follow_up && + task_complete "follow_up" || + error "Follow up function failed" printf "###########################\n########## ZEROG ##########\n###########\ ################\nZEROG flight finished. Log in again and run 'startx' to start