revise PAGER fix for show_readme; thanks to slakmagik for the suggestion; remove the 'warning' before running an update check -- adds an unnecessary step and the point about the update debugging really is not relevant anymore.

This commit is contained in:
chess.griffin 2009-01-23 00:07:37 +00:00
parent f856f309b8
commit a4ff19fadc

View file

@ -306,43 +306,15 @@ check_for_updates () {
check_if_repo_exists check_if_repo_exists
UPDATELIST=$TMP/sbopkg_updatelist UPDATELIST=$TMP/sbopkg_updatelist
rm -f $UPDATELIST rm -f $UPDATELIST
if [ "$DIAG" = 1 ]; then
dialog --title "Check for updates?" --yesno "$(crunch "Would you \
like to check for updates? This is an experimental feature and \
should not be used as a substitute for reading the SBo \
ChangeLog.txt. If you proceed, it might take a few seconds to \
process, depending on the number of SlackBuilds.org packages \
you have installed.\n\nSelect YES to continue or NO to \
cancel.")" 13 50
if [ $? != 0 ]; then
continue
fi
else
while true; do
echo "Would you like to check for updates? This is an"
echo "experimental feature and should not be used as a"
echo "substitute for reading the SBo ChangeLog.txt."
echo
echo "If you proceed, it might take a few moments to process."
echo "Press Y to continue or N to cancel."
read ANS
case $ANS in
y* | Y* ) break
;;
n* | N* ) exit 0
;;
* ) echo "Unknown response."
;;
esac
done
fi
cd /var/log/packages cd /var/log/packages
PKGS=$(ls *_SBo) PKGS=$(ls *_SBo)
VERSION_FILE=$TMP/sbopkg-script-version VERSION_FILE=$TMP/sbopkg-script-version
if [ -e "$PKGS" ]; then if [ -e "$PKGS" ]; then
echo "No SlackBuilds.org packages detected." >> $UPDATELIST echo "No SlackBuilds.org packages detected." >> $UPDATELIST
else else
echo "Building list of potential updates..." crunch_fmt "Building list of potential updates. This may take a \
few moments depending on how many SlackBuilds.org packages you \
have installed..."
crunch_fmt "Listing installed SlackBuilds.org packages and flagging \ crunch_fmt "Listing installed SlackBuilds.org packages and flagging \
potential updates..." >> $UPDATELIST potential updates..." >> $UPDATELIST
echo >> $UPDATELIST echo >> $UPDATELIST
@ -1692,7 +1664,8 @@ gen_search_package () {
show_readme () { show_readme () {
# Show the package's text files. # Show the package's text files.
cd $LOCALREPO/$SLACKVER cd $LOCALREPO/$SLACKVER
${PAGER:-more} $PKGPATH/{README,$PKGNAME.SlackBuild,$PKGNAME.info.build,slack-desc} ${PAGER:-more} \
$PKGPATH/{README,$PKGNAME.SlackBuild,$PKGNAME.info.build,slack-desc}
rm -f $PKGPATH/$PKGNAME.info.build rm -f $PKGPATH/$PKGNAME.info.build
return 0 return 0
} }