Robert, as you mentioned 'ab' I thought I better test this as well, as I had stumbled over this problem originally with 'xsetup.sh'.
I guess you did the same test of 'ab', but just in case: The quitting was not really working, so I made some minor modifications:
--- /usr/bin/ab-
+++ /usr/bin/ab
@@ -45,21 +45,22 @@
ITEM="$1"
searchRepository $ITEM
selectItem
-displayInfo
+ANS=$EXTN
while [ "$ANS" != "q" ]; do
-[ -n "$EXTN" ] && echo -n "I)nstall O)nDemand D)epends F)iles L)ist "
-echo -n "S)earch, P)rovides, or Q)uit: "; read -s -n1 ANS; echo
-case ${ANS} in
- I|i) tce-load -w -i "$EXTN" ;;
- O|o) tce-load -w "$EXTN" ;;
- D|d) displayDepends ;;
- F|f) displayFiles ;;
- L|l) selectItem ;;
- S|s) ITEM="" && searchRepository "$ITEM" && selectItem && displayInfo ;;
- P|p) ITEM="" && whatProvides "$ITEM" && selectItem && displayInfo ;;
- Q|q) rm info.lst && exit ;;
- *) displayInfo ;;
-esac
+ displayInfo
+ [ -n "$EXTN" ] && echo -n "I)nstall O)nDemand D)epends F)iles L)ist "
+ echo -n "S)earch, P)rovides, or Q)uit: "; read -s -n1 ANS; echo
+ case ${ANS} in
+ I|i) tce-load -w -i "$EXTN" ;;
+ O|o) tce-load -w "$EXTN" ;;
+ D|d) displayDepends ;;
+ F|f) displayFiles ;;
+ L|l) selectItem ;;
+ S|s) ITEM="" && searchRepository "$ITEM" && selectItem && displayInfo ;;
+ P|p) ITEM="" && whatProvides "$ITEM" && selectItem && displayInfo ;;
+ Q|q) continue ;;
+ *) displayInfo ;;
+ esac
done
-cd -
+cd - > /dev/null
rm -rf $TMPDIR 2>/dev/null
Now, that looks like more than it really is, as I've chosen to indent the while block (for better readability). So apart from setting ANS just before the while, and moving 'displayInfo' into the block, it just changes the quit case (to ensure a proper cleanup) plus surpresses a surplus message.