diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 2ccb75a..b8ea1e8 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -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