Skip to content

Commit

Permalink
Merge pull request #79 from itoffshore/logs
Browse files Browse the repository at this point in the history
fix `-l` option (log cleanup)
  • Loading branch information
itoffshore authored Aug 22, 2024
2 parents bea8d9e + 8e29c00 commit c4ff569
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/abk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------
# https://github.com/itoffshore/Arch-SKM
#
# Stuart Cardall 20230611
# Stuart Cardall 20240822
#
############################################
## USER configuration ######################
Expand Down Expand Up @@ -587,14 +587,21 @@ clean_logs() {
# build_kernel() leaves named pipes from makepkg logging
# if user response to clean_dir() takes too long
if [ -n "$logpipe_list" ]; then
rm -f "$logpipe_list"
for x in $logpipe_list; do
rm -f "$x"
echo "removed: $x"
done
msg "Removed all makepkg logpipes in: $log_dir"
fi

if [ -n "$log_list" ]; then
ask "Remove log files in: $log_dir ? [all/y/N] : "; read -r ans

case "$ans" in
all|ALL) rm -f "$log_list"
all|ALL) for x in $log_list; do
rm -f "$x"
echo "removed: $x"
done
msg "Removed all makepkg logs in: $log_dir"
;;
y|Y) msg "<ENTER> to remove each following log (any other input to keep):\n"
Expand Down

0 comments on commit c4ff569

Please sign in to comment.