mirror of
https://github.com/sbopkg/sbopkg
synced 2025-02-06 08:45:52 +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 () {
|
add_item_to_queue () {
|
||||||
# This function takes three argument, APP, VERSION, and BUILD. If
|
# This function takes three argument, APP, VERSION, and BUILD. If APP is
|
||||||
# APP is already in the queue, ask user if they want to replace it (so
|
# already in the queue, ask user if they want to replace it (so updated
|
||||||
# updated pkgs will get updated in the queue). NOTE: this is a
|
# pkgs will get updated in the queue). NOTE: this is a work-in-progress.
|
||||||
# work-in-progress; this function is not called yet. The idea is that
|
# The idea is that whenever an item is added to the queue, whether after
|
||||||
# whenever an item is added to the queue, whether after the update run, or
|
# the update run, or when an individual item is added from the info_item
|
||||||
# when an individual item is added from the info_item menu, or when a
|
# menu, or when a backup or user's queue is loaded, then each APP and
|
||||||
# backup or user's queue is loaded, then each APP and VERSION-BUILD is
|
# VERSION-BUILD is sent to this function for processing. Once this is
|
||||||
# sent to this function for processing. Once this is working remove this
|
# working remove this NOTE from this comment.
|
||||||
# NOTE from this comment.
|
|
||||||
APP=$1
|
APP=$1
|
||||||
VERSION=$2
|
VERSION=$2
|
||||||
BUILD=$3
|
BUILD=$3
|
||||||
|
@ -1038,21 +1037,22 @@ add_item_to_queue () {
|
||||||
if $(cat $TMPQUEUE | grep -q "^$APP "); then
|
if $(cat $TMPQUEUE | grep -q "^$APP "); then
|
||||||
dialog --title "ERROR" --yesno "$(crunch "$APP is already in the \
|
dialog --title "ERROR" --yesno "$(crunch "$APP is already in the \
|
||||||
queue. Do you want to replace it? Press <Yes> to replace or \
|
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
|
if [ $? = 0 ]; then
|
||||||
sed -i "s/^$APP .*$/$APP $VERSION-$BUILD ON/" $TMPQUEUE
|
sed -i "s/^$APP .*$/$APP $VERSION-$BUILD ON/" $TMPQUEUE
|
||||||
else
|
else
|
||||||
dialog --title "Skipped" --msgbox "$(crunch "$APP was \
|
dialog --title "Skipped" --msgbox "$(crunch "$APP was \
|
||||||
skipped.")" 8 30
|
skipped.")" 8 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$APP $VERSION-$BUILD ON" >> $TMP/sbopkg-tmp-queue
|
echo "$APP $VERSION-$BUILD ON" >> $TMP/sbopkg-tmp-queue
|
||||||
fi
|
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
|
# does not get the following message after each individual app has been
|
||||||
# added but only at the end.
|
# added but only at the end? Or, maybe leave as is, so users get feedback
|
||||||
dialog --title "Done" --msgbox "$APP has been added to the build queue." 8 30
|
# 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 () {
|
view_queue () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue