mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-09 19:50:25 +03:00
add ability to view the sbopkg-build-log from the main menu; add error check to warn user if log is not found; add ability for user to keep or delete the sbopkg-build-log after viewing it
This commit is contained in:
parent
1f626db742
commit
029ef04293
@ -259,6 +259,30 @@ dialog --title "Displaying $SRCDIR" \
|
|||||||
--textbox $TMP/sbopkg_cache_dir 0 0
|
--textbox $TMP/sbopkg_cache_dir 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view_perm_log () {
|
||||||
|
# This function displays the contents of the permanent build log,
|
||||||
|
# which is kept if KEEPLOG is set to YES in the config file
|
||||||
|
if [ ! -e $TMP/sbopkg-build-log ]; then
|
||||||
|
dialog --title "ERROR" --msgbox "No permanent log \
|
||||||
|
sbopkg-build-log found. Please make sure KEEPLOG is set to YES \
|
||||||
|
in the configuration file." 0 0
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
dialog --title "Displaying $TMP/sbopkg-build-log" \
|
||||||
|
--textbox $TMP/sbopkg-build-log 0 0
|
||||||
|
dialog --title "Keep Log?" --yesno "Would you like to keep the \
|
||||||
|
permanent build log $TMP/sbopkg-build-log? Select YES to keep or NO
|
||||||
|
to delete." 0 0
|
||||||
|
#2>$TMP/sbopkg_keep_log
|
||||||
|
if [ $? = 1 ]; then
|
||||||
|
rm -rf $TMP/sbopkg-build-log
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
rsync_command () {
|
rsync_command () {
|
||||||
# This function holds the rsync command
|
# This function holds the rsync command
|
||||||
/usr/bin/rsync -avz --delete --timeout=5 --exclude="*.sbopkg" \
|
/usr/bin/rsync -avz --delete --timeout=5 --exclude="*.sbopkg" \
|
||||||
@ -423,11 +447,12 @@ while [ 0 ]; do
|
|||||||
dialog --title "SlackBuilds.org Package Browser \
|
dialog --title "SlackBuilds.org Package Browser \
|
||||||
(sbopkg version $VER)" --menu \
|
(sbopkg version $VER)" --menu \
|
||||||
"\nChoose one of the following or press <Cancel> to exit\n" \
|
"\nChoose one of the following or press <Cancel> to exit\n" \
|
||||||
15 60 5 \
|
15 60 6 \
|
||||||
"Rsync" "Rsync with SlackBuilds.org" \
|
"Rsync" "Rsync with SlackBuilds.org" \
|
||||||
"ChangeLog" "View the SlackBuilds.org ChangeLog" \
|
"ChangeLog" "View the SlackBuilds.org ChangeLog" \
|
||||||
"Browse" "Browse the local SlackBuilds.org repo" \
|
"Browse" "Browse the local SlackBuilds.org repo" \
|
||||||
"Cache" "View the contents of the cache directory" \
|
"Cache" "View the contents of the cache directory" \
|
||||||
|
"Log" "View the permanent build log" \
|
||||||
"Exit" "Exit sbopkg" 2>$TMP/sbopkg_main_menu_answer
|
"Exit" "Exit sbopkg" 2>$TMP/sbopkg_main_menu_answer
|
||||||
|
|
||||||
if [ $? = 1 ]; then
|
if [ $? = 1 ]; then
|
||||||
@ -454,6 +479,10 @@ if [ "$R" = "Cache" ]; then
|
|||||||
view_cache_dir
|
view_cache_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$R" = "Log" ]; then
|
||||||
|
view_perm_log
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$R" = "Exit" ]; then
|
if [ "$R" = "Exit" ]; then
|
||||||
clear
|
clear
|
||||||
cleanup
|
cleanup
|
||||||
|
Loading…
Reference in New Issue
Block a user