mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-19 10:26:56 +01:00
commit another patch from slakmagik that renames 'delete build queue' to 'edit build queue'; thanks to slakmagik for the patch
This commit is contained in:
parent
f6703f7042
commit
d8083b17fb
1 changed files with 7 additions and 8 deletions
|
@ -1174,15 +1174,14 @@ save_user_queue () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_build_queue () {
|
edit_build_queue () {
|
||||||
# This function deletes items in the build queue.
|
# This function deletes items in the build queue.
|
||||||
local TMPQUEUE REMOVEQUEUE WORKINGQUEUE
|
local TMPQUEUE=$TMP/sbopkg-tmp-queue
|
||||||
|
local REMOVEQUEUE=$TMP/sbopkg-remove-queue
|
||||||
|
local WORKINGQUEUE=$TMP/sbopkg-working-queue
|
||||||
local CHOICE REMOVE REMOVED
|
local CHOICE REMOVE REMOVED
|
||||||
|
|
||||||
if empty_queue; then return; fi
|
if empty_queue; then return; fi
|
||||||
TMPQUEUE=$TMP/sbopkg-tmp-queue
|
|
||||||
REMOVEQUEUE=$TMP/sbopkg-remove-queue
|
|
||||||
WORKINGQUEUE=$TMP/sbopkg-working-queue
|
|
||||||
sed -e 's/ ON$//g;s/ OFF$//g' $TMPQUEUE > $REMOVEQUEUE
|
sed -e 's/ ON$//g;s/ OFF$//g' $TMPQUEUE > $REMOVEQUEUE
|
||||||
while :; do
|
while :; do
|
||||||
# "dialog" segfaults when asked to display an empty menu.
|
# "dialog" segfaults when asked to display an empty menu.
|
||||||
|
@ -1191,7 +1190,7 @@ delete_build_queue () {
|
||||||
if [[ $(wc -w <$REMOVEQUEUE) -eq 0 ]]; then
|
if [[ $(wc -w <$REMOVEQUEUE) -eq 0 ]]; then
|
||||||
echo '"" "The queue is empty."' >$REMOVEQUEUE
|
echo '"" "The queue is empty."' >$REMOVEQUEUE
|
||||||
fi
|
fi
|
||||||
dialog --title "Delete Build Queue" --ok-label "Delete" \
|
dialog --title "Edit Build Queue" --ok-label "Delete" \
|
||||||
--extra-button --extra-label "Clear" --help-button \
|
--extra-button --extra-label "Clear" --help-button \
|
||||||
--help-label "Done" --cancel-label "Cancel" \
|
--help-label "Done" --cancel-label "Cancel" \
|
||||||
--menu "$(crunch "The following packages are currently in \
|
--menu "$(crunch "The following packages are currently in \
|
||||||
|
@ -2549,8 +2548,8 @@ queue_menu () {
|
||||||
"\nChoose one of the following or press <Back> to go back.\n" \
|
"\nChoose one of the following or press <Back> to go back.\n" \
|
||||||
15 60 $HEIGHT \
|
15 60 $HEIGHT \
|
||||||
"View" "View the build queue" \
|
"View" "View the build queue" \
|
||||||
"Delete" "Delete items from the build queue" \
|
|
||||||
"Load" "Load a saved build queue" \
|
"Load" "Load a saved build queue" \
|
||||||
|
"Edit" "Edit the current build queue" \
|
||||||
"Save" "Save the current build queue" \
|
"Save" "Save the current build queue" \
|
||||||
"${ROOT_OPTS[@]}" \
|
"${ROOT_OPTS[@]}" \
|
||||||
2>$TMP/sbopkg_queue_menu_answer
|
2>$TMP/sbopkg_queue_menu_answer
|
||||||
|
@ -2558,10 +2557,10 @@ queue_menu () {
|
||||||
Q="$(cat $TMP/sbopkg_queue_menu_answer)"
|
Q="$(cat $TMP/sbopkg_queue_menu_answer)"
|
||||||
|
|
||||||
case "$Q" in
|
case "$Q" in
|
||||||
|
"Edit") edit_build_queue ;;
|
||||||
"View") view_queue ;;
|
"View") view_queue ;;
|
||||||
"Process") BUILDPKGS=1
|
"Process") BUILDPKGS=1
|
||||||
process_queue ;;
|
process_queue ;;
|
||||||
"Delete") delete_build_queue ;;
|
|
||||||
"Load") load_user_queue ;;
|
"Load") load_user_queue ;;
|
||||||
"Save") save_user_queue ;;
|
"Save") save_user_queue ;;
|
||||||
*) # "Exit", or an empty string if Exit, instead of Ok,
|
*) # "Exit", or an empty string if Exit, instead of Ok,
|
||||||
|
|
Loading…
Reference in a new issue