mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-29 20:34:34 +01:00
minor tweaks to add_item_to_queue.
This commit is contained in:
parent
736b669f67
commit
17a05947c2
1 changed files with 14 additions and 14 deletions
|
@ -1022,15 +1022,14 @@ clear_build_queue () {
|
|||
}
|
||||
|
||||
add_item_to_queue () {
|
||||
# This function takes three argument, APP, VERSION, and BUILD. If
|
||||
# APP is already in the queue, ask user if they want to replace it (so
|
||||
# updated pkgs will get updated in the queue). NOTE: this is a
|
||||
# work-in-progress; this function is not called yet. The idea is that
|
||||
# whenever an item is added to the queue, whether after the update run, or
|
||||
# when an individual item is added from the info_item menu, or when a
|
||||
# backup or user's queue is loaded, then each APP and VERSION-BUILD is
|
||||
# sent to this function for processing. Once this is working remove this
|
||||
# NOTE from this comment.
|
||||
# This function takes three argument, APP, VERSION, and BUILD. If APP is
|
||||
# already in the queue, ask user if they want to replace it (so updated
|
||||
# pkgs will get updated in the queue). NOTE: this is a work-in-progress.
|
||||
# The idea is that whenever an item is added to the queue, whether after
|
||||
# the update run, or when an individual item is added from the info_item
|
||||
# menu, or when a backup or user's queue is loaded, then each APP and
|
||||
# VERSION-BUILD is sent to this function for processing. Once this is
|
||||
# working remove this NOTE from this comment.
|
||||
APP=$1
|
||||
VERSION=$2
|
||||
BUILD=$3
|
||||
|
@ -1038,21 +1037,22 @@ add_item_to_queue () {
|
|||
if $(cat $TMPQUEUE | grep -q "^$APP "); then
|
||||
dialog --title "ERROR" --yesno "$(crunch "$APP is already in the \
|
||||
queue. Do you want to replace it? Press <Yes> to replace or \
|
||||
press <No> to skip.")" 10 30
|
||||
press <No> to skip.")" 10 50
|
||||
if [ $? = 0 ]; then
|
||||
sed -i "s/^$APP .*$/$APP $VERSION-$BUILD ON/" $TMPQUEUE
|
||||
else
|
||||
dialog --title "Skipped" --msgbox "$(crunch "$APP was \
|
||||
skipped.")" 8 30
|
||||
skipped.")" 8 40
|
||||
return
|
||||
fi
|
||||
else
|
||||
echo "$APP $VERSION-$BUILD ON" >> $TMP/sbopkg-tmp-queue
|
||||
fi
|
||||
# We need to add a test if this is being done via an update so the user
|
||||
# Do we need to add a test if this is being done via an update so the user
|
||||
# does not get the following message after each individual app has been
|
||||
# added but only at the end.
|
||||
dialog --title "Done" --msgbox "$APP has been added to the build queue." 8 30
|
||||
# added but only at the end? Or, maybe leave as is, so users get feedback
|
||||
# on each update that is added to the queue.
|
||||
dialog --title "Done" --msgbox "$APP has been added to the build queue." 8 40
|
||||
}
|
||||
|
||||
view_queue () {
|
||||
|
|
Loading…
Add table
Reference in a new issue