mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-16 03:41:32 +01:00
apply two patches from slakmagik that fix a variable test, clean up and fix some the slack-desc information capture, and change the updatelist view from cat to PAGER when using the cli; also, add in a few minor tweaks that attempt to avoid the brief junk seen at the bottom of the screen when moving around the dialog interface; there are still a couple of these left, but this fix gets rid of some of it.
This commit is contained in:
parent
3447f86f3d
commit
e8d38048a0
1 changed files with 15 additions and 5 deletions
|
@ -283,7 +283,7 @@ else
|
||||||
fi
|
fi
|
||||||
cd /var/log/packages
|
cd /var/log/packages
|
||||||
PKGS=$(ls *SBo*)
|
PKGS=$(ls *SBo*)
|
||||||
if [ -e "$PKGS" ]; then
|
if [ -z "$PKGS" ]; then
|
||||||
echo "No SlackBuilds.org packages detected." >> $UPDATELIST
|
echo "No SlackBuilds.org packages detected." >> $UPDATELIST
|
||||||
else
|
else
|
||||||
echo "Building list of potential updates..."
|
echo "Building list of potential updates..."
|
||||||
|
@ -441,7 +441,7 @@ if [ "$DIAG" = 1 ]; then
|
||||||
dialog --title "Viewing potential updates." --textbox \
|
dialog --title "Viewing potential updates." --textbox \
|
||||||
$UPDATELIST 0 0
|
$UPDATELIST 0 0
|
||||||
else
|
else
|
||||||
cat $UPDATELIST
|
${PAGER:-more} $UPDATELIST
|
||||||
fi
|
fi
|
||||||
# Permanent log of the updatelist is saved when DEBUG is enabled.
|
# Permanent log of the updatelist is saved when DEBUG is enabled.
|
||||||
if [ "$DEBUG" -ge "1" ]; then
|
if [ "$DEBUG" -ge "1" ]; then
|
||||||
|
@ -474,7 +474,9 @@ rm -f $TMP/sbopkg_category_items_list 2> /dev/null
|
||||||
DIR=( */ )
|
DIR=( */ )
|
||||||
if [ -n "$DIR" ]; then
|
if [ -n "$DIR" ]; then
|
||||||
for i in ${DIR[*]%/}; do
|
for i in ${DIR[*]%/}; do
|
||||||
DESC=$(grep -hZm1 ^$i ./$i/slack-desc* | cut -d\( -f2- | cut -d\) -f1)
|
j=$(echo $i | sed 's/-plus/+/')
|
||||||
|
DESC=$(grep -hZm1 ^$j ./$i/slack-desc* 2>/dev/null |
|
||||||
|
sed 's/^[^(]*( *\(.*\) *)[^)]*$/\1/')
|
||||||
echo "\"$i\" \"$DESC\"" >> $TMP/sbopkg_category_items_list
|
echo "\"$i\" \"$DESC\"" >> $TMP/sbopkg_category_items_list
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -580,8 +582,11 @@ dialog --default-item "$U" --title "$APP ($RVERSION-$RARCH-$RBUILD)" \
|
||||||
"Build" "Build a package for $APP" \
|
"Build" "Build a package for $APP" \
|
||||||
$JPACKAGE 2>$TMP/sbopkg_info_selection
|
$JPACKAGE 2>$TMP/sbopkg_info_selection
|
||||||
CHOICE=$?
|
CHOICE=$?
|
||||||
if [ $CHOICE = 3 ]; then
|
if [ $CHOICE = 1 ]; then
|
||||||
|
rm -f $TMP/sbopkg_*
|
||||||
break
|
break
|
||||||
|
elif [ $CHOICE = 3 ]; then
|
||||||
|
return 0
|
||||||
elif [ $CHOICE = 0 ]; then
|
elif [ $CHOICE = 0 ]; then
|
||||||
U="$(cat $TMP/sbopkg_info_selection)"
|
U="$(cat $TMP/sbopkg_info_selection)"
|
||||||
CATEGORY="$(cat $TMP/sbopkg_category_selection)"
|
CATEGORY="$(cat $TMP/sbopkg_category_selection)"
|
||||||
|
@ -634,7 +639,7 @@ build queue." 8 30
|
||||||
fi
|
fi
|
||||||
rm -f $SBOPKGINSTALLOUTPUT
|
rm -f $SBOPKGINSTALLOUTPUT
|
||||||
fi
|
fi
|
||||||
else # ESC or Cancel
|
else # ESC
|
||||||
rm -f $TMP/sbopkg_*
|
rm -f $TMP/sbopkg_*
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1127,6 +1132,10 @@ if [ -n "$RESULTS" ]; then
|
||||||
item you wish to view or press <Cancel> to exit." 20 70 14 --file \
|
item you wish to view or press <Cancel> to exit." 20 70 14 --file \
|
||||||
$TMP/sbopkg_search_results 2>$TMP/sbopkg_search_choice
|
$TMP/sbopkg_search_results 2>$TMP/sbopkg_search_choice
|
||||||
CHOICE=$?
|
CHOICE=$?
|
||||||
|
if [ $CHOICE = 1 ]; then
|
||||||
|
rm -f $TMP/sbopkg_search_results
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
SRCHPICK="$(cat $TMP/sbopkg_search_choice)"
|
SRCHPICK="$(cat $TMP/sbopkg_search_choice)"
|
||||||
SRCHCAT=$(echo $SRCHPICK | sed -e 's/\/.*$//')
|
SRCHCAT=$(echo $SRCHPICK | sed -e 's/\/.*$//')
|
||||||
SRCHPKG=$(echo $SRCHPICK | sed -e 's/^.*\///')
|
SRCHPKG=$(echo $SRCHPICK | sed -e 's/^.*\///')
|
||||||
|
@ -1154,6 +1163,7 @@ item you wish to view or press <Cancel> to exit." 20 70 14 --file \
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
rm -f $TMP/sbopkg_search_results
|
rm -f $TMP/sbopkg_search_results
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue