mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
clean up some whitespace; offer to delete queue after processing; try to fix md5sum failure dialog issues
This commit is contained in:
parent
db76f791b7
commit
2d1a5234eb
@ -588,9 +588,9 @@ build/install queue." 8 30
|
|||||||
process_queue
|
process_queue
|
||||||
fi
|
fi
|
||||||
if [ "$U" = "Install" ]; then
|
if [ "$U" = "Install" ]; then
|
||||||
SBOPKGINSTALLOUTPUT=$TMP/sbopkg_install_output
|
SBOPKGINSTALLOUTPUT=$TMP/sbopkg_install_output
|
||||||
install_package $IPACKAGE | tee $SBOPKGINSTALLOUTPUT
|
install_package $IPACKAGE | tee $SBOPKGINSTALLOUTPUT
|
||||||
read -n 1 -p "Press any key to continue."
|
read -n 1 -p "Press any key to continue."
|
||||||
if [ "$KEEPLOG" = "YES" ]; then
|
if [ "$KEEPLOG" = "YES" ]; then
|
||||||
cat $SBOPKGINSTALLOUTPUT >> $TMP/sbopkg-build-log
|
cat $SBOPKGINSTALLOUTPUT >> $TMP/sbopkg-build-log
|
||||||
fi
|
fi
|
||||||
@ -742,9 +742,9 @@ if [ ! -e $TMPQUEUE ]; then
|
|||||||
else
|
else
|
||||||
dialog --title "Viewing Build Queue" --separate-output \
|
dialog --title "Viewing Build Queue" --separate-output \
|
||||||
--checklist "Please select or unselect those packages \
|
--checklist "Please select or unselect those packages \
|
||||||
you wish to keep in the queue and then <Ok> to continue \
|
you wish to keep in the queue and then <Ok> to continue \
|
||||||
or press <Cancel> to exit." \
|
or press <Cancel> to exit." 18 40 8 \
|
||||||
18 40 8 --file $TMPQUEUE 2>$TMP/sbopkg-ans-queue
|
--file $TMPQUEUE 2>$TMP/sbopkg-ans-queue
|
||||||
if [ $? = 1 ]; then
|
if [ $? = 1 ]; then
|
||||||
rm -rf $TMP/sbopkg-ans-queue
|
rm -rf $TMP/sbopkg-ans-queue
|
||||||
continue
|
continue
|
||||||
@ -995,13 +995,14 @@ rm -rf $TMP/sbopkg_install.lck
|
|||||||
|
|
||||||
checksum_fail () {
|
checksum_fail () {
|
||||||
# Offer to remove source if MD5SUM check fails.
|
# Offer to remove source if MD5SUM check fails.
|
||||||
RMSRC=$1
|
#RMSRC=$1
|
||||||
if [ "$DIAG" = 1 ]; then
|
if [ "$DIAG" = 1 ]; then
|
||||||
dialog --title "MD5SUM Failed" --yes-label "Keep" --no-label "Delete" \
|
dialog --title "MD5SUM Failed" --yes-label "Keep" --no-label \
|
||||||
--yesno "It appears the MD5SUM check failed for the downloaded source. \
|
"Delete" --yesno "It appears the MD5SUM check failed for the \
|
||||||
The build process will not continue. Would you still like to keep the \
|
downloaded source. The build process will not continue. Would \
|
||||||
the downloaded source for $PKG in $SRCDIR or would you like to delete \
|
you still like to keep the the downloaded source for $PKG in \
|
||||||
the source and try again?" 15 35
|
$SRCDIR or would you like to delete the source and try again?" \
|
||||||
|
15 45
|
||||||
if [ $? = 1 ]; then
|
if [ $? = 1 ]; then
|
||||||
check_root
|
check_root
|
||||||
if [ $ROOT = "false" ]; then
|
if [ $ROOT = "false" ]; then
|
||||||
@ -1290,12 +1291,13 @@ to build packages."
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$DIAG" = 1 && "$BUILDPKGS" = 1 ]]; then
|
if [ "$BUILDPKGS" = 1 ]; then
|
||||||
view_queue
|
view_queue
|
||||||
dialog --title "Install Packages" --yes-label "Build" \
|
fi
|
||||||
|
if [ "$DIAG" = 1 ]; then
|
||||||
|
dialog --title "Install Package(s)" --yes-label "Build" \
|
||||||
--no-label "Build and Install" --yesno "Would you like to build the \
|
--no-label "Build and Install" --yesno "Would you like to build the \
|
||||||
packages in the queue, or build and install the packages in \
|
package(s) only, or build and install the package(s)?" 8 50
|
||||||
the queue?" 8 50
|
|
||||||
if [ $? = 1 ]; then
|
if [ $? = 1 ]; then
|
||||||
INSTALLPKGS=1
|
INSTALLPKGS=1
|
||||||
fi
|
fi
|
||||||
@ -1335,8 +1337,8 @@ edits." 8 30
|
|||||||
if [ "$DIAG" = 1 ]; then
|
if [ "$DIAG" = 1 ]; then
|
||||||
dialog --title "Pre-Check Log" --textbox $PRECHECKLOG 0 0
|
dialog --title "Pre-Check Log" --textbox $PRECHECKLOG 0 0
|
||||||
dialog --title "Continue?" --yesno "Do you want to continue \
|
dialog --title "Continue?" --yesno "Do you want to continue \
|
||||||
with the build/install process? This is your last chance to \
|
with the build/install process? This is your last chance to bail \
|
||||||
bail out. Press <Yes> to continue or <No> to exit." 8 40
|
out. Press <Yes> to continue or <No> to exit." 8 40
|
||||||
if [ $? = 1 ]; then
|
if [ $? = 1 ]; then
|
||||||
rm -rf $STARTQUEUE $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
rm -rf $STARTQUEUE $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
||||||
continue
|
continue
|
||||||
@ -1383,21 +1385,23 @@ done
|
|||||||
echo "******************************************" >> $SUMMARYLOG
|
echo "******************************************" >> $SUMMARYLOG
|
||||||
cat $SUMMARYLOG
|
cat $SUMMARYLOG
|
||||||
read -n 1 -p "Press any key to continue."
|
read -n 1 -p "Press any key to continue."
|
||||||
#if [ "$DIAG" = 1 ]; then
|
if [ -e $TMP/sbopkg-tmp-queue ]; then
|
||||||
# if [ "$BUILDPKGS" = 1 ]; then
|
dialog --title "Delete Queue?" --yes-label "Keep" --no-label \
|
||||||
# view_queue
|
"Delete" --yesno "Would you like to keep the queue or would \
|
||||||
# else
|
you like to delete it?" 6 40
|
||||||
# rm -rf $STARTQUEUE
|
if [ $? = 1 ]; then
|
||||||
# fi
|
rm -rf $TMP/sbopkg-tmp-queue
|
||||||
#fi
|
dialog --title "Done" --msgbox "The queue has been \
|
||||||
|
deleted." 8 35
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "$KEEPLOG" = "YES" ]; then
|
if [ "$KEEPLOG" = "YES" ]; then
|
||||||
cat $SBOPKGOUTPUT >> $TMP/sbopkg-build-log
|
cat $SBOPKGOUTPUT >> $TMP/sbopkg-build-log
|
||||||
cat $SUMMARYLOG >> $TMP/sbopkg-build-log
|
cat $SUMMARYLOG >> $TMP/sbopkg-build-log
|
||||||
fi
|
fi
|
||||||
BUILDPKGS=""
|
BUILDPKGS=""
|
||||||
INSTALLPKGS=""
|
INSTALLPKGS=""
|
||||||
rm -rf $SBOPKGOUTPUT $STARTQUEUE $FINALQUEUE \
|
rm -rf $SBOPKGOUTPUT $STARTQUEUE $FINALQUEUE $PRECHECKLOG $SUMMARYLOG
|
||||||
$PRECHECKLOG $SUMMARYLOG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup () {
|
cleanup () {
|
||||||
|
Loading…
Reference in New Issue
Block a user