mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-12 21:10:21 +03:00
add an error check to the log deletion requiring root privileges; add a "done" msgbox after log is deleted.
This commit is contained in:
parent
029ef04293
commit
a628c076cb
@ -271,12 +271,21 @@ 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
|
||||
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
|
||||
check_root
|
||||
if [ $ROOT = "false" ]; then
|
||||
dialog --title "ERROR" --msgbox "Sorry, only the root \
|
||||
user can delete the build log." 0 0
|
||||
continue
|
||||
else
|
||||
rm -rf $TMP/sbopkg-build-log
|
||||
dialog --title "Done" --msgbox "The build log has been \
|
||||
deleted." 0 0
|
||||
continue
|
||||
fi
|
||||
else
|
||||
continue
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user