#192345)
* revdep-rebuild: Correctly handle the case where an ebuild no longer
exists for a package (Bug #188918)
+ * eread: Fix eread to not accept invalid input for file selection.
+ (Bug #189994)
2007-08-08: Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Fix progress bar to only update when there is a
break
;;
*)
- ${PAGER} ${FILE}
- read -p "Delete file? [y/N] " DELETE
- case ${DELETE} in
- q)
- echo "Quitting"
- QUIT="yes"
- break
- ;;
- y|Y)
- rm -f ${FILE}
- SUCCESS=$?
- if [[ ${SUCCESS} = 0 ]]; then
- echo "Deleted ${FILE}"
- else
- echo "Unable to delete ${FILE}"
- fi
- ;;
- # Empty string defaults to N (save file)
- n|N|"")
- echo "Saving ${FILE}"
- ;;
- *)
- echo "Invalid response. Saving ${FILE}"
- ;;
- esac
+ if [ -f "$FILE" ]; then
+ ${PAGER} ${FILE}
+ read -p "Delete file? [y/N] " DELETE
+ case ${DELETE} in
+ q)
+ echo "Quitting"
+ QUIT="yes"
+ break
+ ;;
+ y|Y)
+ rm -f ${FILE}
+ SUCCESS=$?
+ if [[ ${SUCCESS} = 0 ]]; then
+ echo "Deleted ${FILE}"
+ else
+ echo "Unable to delete ${FILE}"
+ fi
+ ;;
+ # Empty string defaults to N (save file)
+ n|N|"")
+ echo "Saving ${FILE}"
+ ;;
+ *)
+ echo "Invalid response. Saving ${FILE}"
+ ;;
+ esac
+ else
+ echo
+ echo "Invalid response."
+ fi
;;
esac
break