mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-31 10:23:25 +01:00
change .sboq extension to .sqf (sbopkg queue file); I never liked the .sboq even though I came up with it.
This commit is contained in:
parent
6ca3e9df3a
commit
967a185c45
1 changed files with 16 additions and 16 deletions
|
@ -1402,15 +1402,15 @@ queue_dir_lister() {
|
||||||
local QFS=$SBOPKGTMP/sbopkg_queue_files_selection
|
local QFS=$SBOPKGTMP/sbopkg_queue_files_selection
|
||||||
local QFM=$SBOPKGTMP/sbopkg_queue_files_menu
|
local QFM=$SBOPKGTMP/sbopkg_queue_files_menu
|
||||||
|
|
||||||
if [[ -z $(ls -A $QUEUEDIR/*.sboq 2> /dev/null) ]]; then
|
if [[ -z $(ls -A $QUEUEDIR/*.sqf 2> /dev/null) ]]; then
|
||||||
if [[ $DIAG ]]; then
|
if [[ $DIAG ]]; then
|
||||||
dialog --title "ERROR" --msgbox "$(crunch "The queue directory \
|
dialog --title "ERROR" --msgbox "$(crunch "The queue directory \
|
||||||
$QUEUEDIR is empty.")" 8 30
|
$QUEUEDIR is empty.")" 8 30
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
find $QUEUEDIR -type f -name '*.sboq' -printf "\"%P\" \"\" off\n" \
|
find $QUEUEDIR -type f -name '*.sqf' -printf "\"%P\" \"\" off\n" \
|
||||||
| sed -e 's/.sboq//' | sort > $QFM
|
| sed -e 's/.sqf//' | sort > $QFM
|
||||||
# The --default item doesn't work on deletions and renames (because the
|
# The --default item doesn't work on deletions and renames (because the
|
||||||
# variable expands to a no-longer existing file) but you can't give it an
|
# variable expands to a no-longer existing file) but you can't give it an
|
||||||
# index argument, unfortunately
|
# index argument, unfortunately
|
||||||
|
@ -1453,7 +1453,7 @@ load_user_queue() {
|
||||||
|
|
||||||
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
|
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
|
||||||
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
||||||
FILE="$FILE.sboq"
|
FILE="$FILE.sqf"
|
||||||
if [[ -r $FILE ]]; then
|
if [[ -r $FILE ]]; then
|
||||||
# this inhibits add_item_to_queue's msgbox for each added app
|
# this inhibits add_item_to_queue's msgbox for each added app
|
||||||
touch $USERQUEUE_LOCK
|
touch $USERQUEUE_LOCK
|
||||||
|
@ -1482,7 +1482,7 @@ delete_user_queue() {
|
||||||
|
|
||||||
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
|
for ((i=0; i<${#USERQUEUE[*]}; i++)); do
|
||||||
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
||||||
FILE="$FILE.sboq"
|
FILE="$FILE.sqf"
|
||||||
if ! rm -f $FILE 2> /dev/null; then
|
if ! rm -f $FILE 2> /dev/null; then
|
||||||
dialog --title "ERROR" --msgbox \
|
dialog --title "ERROR" --msgbox \
|
||||||
"You do not have permission to remove $FILE" 0 0
|
"You do not have permission to remove $FILE" 0 0
|
||||||
|
@ -1525,7 +1525,7 @@ rename_user_queue() {
|
||||||
COUNTER=${#USERQUEUE[*]}
|
COUNTER=${#USERQUEUE[*]}
|
||||||
for ((i=0; i<$COUNTER; i++)); do
|
for ((i=0; i<$COUNTER; i++)); do
|
||||||
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
FILE=$QUEUEDIR/${USERQUEUE[$i]//'"'/}
|
||||||
FILE="$FILE.sboq"
|
FILE="$FILE.sqf"
|
||||||
if [[ -w ${FILE%/*} ]]; then
|
if [[ -w ${FILE%/*} ]]; then
|
||||||
# This loops so the user can be brought back to the inputbox on a
|
# This loops so the user can be brought back to the inputbox on a
|
||||||
# failure (continue) or back to the dir lister on success (break)
|
# failure (continue) or back to the dir lister on success (break)
|
||||||
|
@ -1542,7 +1542,7 @@ rename_user_queue() {
|
||||||
exists. Please choose another name.")" 0 0
|
exists. Please choose another name.")" 0 0
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
mv "$FILE" "$QUEUEDIR/$NEWNAME.sboq"
|
mv "$FILE" "$QUEUEDIR/$NEWNAME.sqf"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -1611,7 +1611,7 @@ save_user_queue() {
|
||||||
to discard it")
|
to discard it")
|
||||||
# Find an unused automatic file name
|
# Find an unused automatic file name
|
||||||
i=0
|
i=0
|
||||||
while [[ -f $QUEUEDIR/sbopkg-autosave-$i.sboq ]]; do
|
while [[ -f $QUEUEDIR/sbopkg-autosave-$i.sqf ]]; do
|
||||||
(( i++ ))
|
(( i++ ))
|
||||||
done
|
done
|
||||||
DEFAULT=sbopkg-autosave-$i
|
DEFAULT=sbopkg-autosave-$i
|
||||||
|
@ -1637,7 +1637,7 @@ save_user_queue() {
|
||||||
if ! validate_queue_name $USERQUEUE; then
|
if ! validate_queue_name $USERQUEUE; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [[ -e $USERQUEUE_NAME.sboq ]]; then
|
if [[ -e $USERQUEUE_NAME.sqf ]]; then
|
||||||
dialog --title "ERROR" --yesno "$(crunch "Another file \
|
dialog --title "ERROR" --yesno "$(crunch "Another file \
|
||||||
with that name already exists. Press <Yes> to \
|
with that name already exists. Press <Yes> to \
|
||||||
continue and overwrite the other file (keep in mind that \
|
continue and overwrite the other file (keep in mind that \
|
||||||
|
@ -1647,8 +1647,8 @@ save_user_queue() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if cp $SAVEQUEUE $QUEUEDIR/$USERQUEUE_NAME.sboq; then
|
if cp $SAVEQUEUE $QUEUEDIR/$USERQUEUE_NAME.sqf; then
|
||||||
LAST_USER_QUEUE_ON_DISK=$QUEUEDIR/$USERQUEUE_NAME.sboq
|
LAST_USER_QUEUE_ON_DISK=$QUEUEDIR/$USERQUEUE_NAME.sqf
|
||||||
else
|
else
|
||||||
dialog --title "ERROR" --msgbox "Problem saving build queue."\
|
dialog --title "ERROR" --msgbox "Problem saving build queue."\
|
||||||
8 30
|
8 30
|
||||||
|
@ -1776,7 +1776,7 @@ add_item_to_queue() {
|
||||||
ONOFF=OFF
|
ONOFF=OFF
|
||||||
elif [[ ${APP:0:1} == "@" ]]; then
|
elif [[ ${APP:0:1} == "@" ]]; then
|
||||||
APP=${APP:1}
|
APP=${APP:1}
|
||||||
FILE="$QUEUEDIR/$APP.sboq"
|
FILE="$QUEUEDIR/$APP.sqf"
|
||||||
# FIXME: This next line unset APP is there to apparently fix an
|
# FIXME: This next line unset APP is there to apparently fix an
|
||||||
# issue where a recursive queue with a @ in front of it would
|
# issue where a recursive queue with a @ in front of it would
|
||||||
# finish up and then cut off the first letter of the next package
|
# finish up and then cut off the first letter of the next package
|
||||||
|
@ -3911,7 +3911,7 @@ else
|
||||||
> $SBOPKGTMP/sbopkg-start-queue
|
> $SBOPKGTMP/sbopkg-start-queue
|
||||||
> $SBOPKGTMP/sbopkg_user_queue.lck
|
> $SBOPKGTMP/sbopkg_user_queue.lck
|
||||||
for PKGBUILD in $BUILD; do
|
for PKGBUILD in $BUILD; do
|
||||||
if [[ -r $QUEUEDIR/$PKGBUILD.sboq ]] &&
|
if [[ -r $QUEUEDIR/$PKGBUILD.sqf ]] &&
|
||||||
search_package $PKGBUILD; then
|
search_package $PKGBUILD; then
|
||||||
crunch_fmt "Both a queuefile and a package were found with \
|
crunch_fmt "Both a queuefile and a package were found with \
|
||||||
the name \"$PKGBUILD\". Which would you like to use?"
|
the name \"$PKGBUILD\". Which would you like to use?"
|
||||||
|
@ -3920,7 +3920,7 @@ else
|
||||||
while :; do
|
while :; do
|
||||||
read ANS
|
read ANS
|
||||||
case $ANS in
|
case $ANS in
|
||||||
q* | Q* ) parse_queue $QUEUEDIR/$PKGBUILD.sboq
|
q* | Q* ) parse_queue $QUEUEDIR/$PKGBUILD.sqf
|
||||||
;;
|
;;
|
||||||
p* | P* ) echo $PKGBUILD >> $TMPQUEUE
|
p* | P* ) echo $PKGBUILD >> $TMPQUEUE
|
||||||
break
|
break
|
||||||
|
@ -3932,9 +3932,9 @@ else
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
if [[ -r $QUEUEDIR/$PKGBUILD.sboq ]]; then
|
if [[ -r $QUEUEDIR/$PKGBUILD.sqf ]]; then
|
||||||
# Add an entire queue
|
# Add an entire queue
|
||||||
parse_queue $QUEUEDIR/$PKGBUILD.sboq
|
parse_queue $QUEUEDIR/$PKGBUILD.sqf
|
||||||
else
|
else
|
||||||
if search_package $PKGBUILD; then
|
if search_package $PKGBUILD; then
|
||||||
# Add a single package
|
# Add a single package
|
||||||
|
|
Loading…
Reference in a new issue