Fix path and fully qualified paths for bug 172969
authorantarus <antarus@gentoo.org>
Sun, 1 Apr 2007 07:09:41 +0000 (07:09 -0000)
committerantarus <antarus@gentoo.org>
Sun, 1 Apr 2007 07:09:41 +0000 (07:09 -0000)
svn path=/; revision=384

trunk/src/eread/eread

index 69db604379b5510f3a5d9bd406a1085cfa8e9ae2..20974604c61ac445c09fb109d063c1cd06a9a8f1 100755 (executable)
@@ -6,6 +6,10 @@
 # Author: Donnie Berkholz <spyderous@gentoo.org>
 # Updated by: Uwe Klosa <uwe.klosa@gmail.com>
 
+# set decent PATH for bug 172969
+
+PATH=/usr/bin:/bin:${PATH}
+
 # Set ELOGDIR
 PORT_LOGDIR="$(portageq envvar PORT_LOGDIR)"
 [ "$PORT_LOGDIR" = "" ] && PORT_LOGDIR="/var/log/portage"
@@ -18,14 +22,14 @@ if [ ! -d "$ELOGDIR" ]; then
 fi
 
 # Use the pager from the users environment
-[ -z "$PAGER" ] && PAGER="/usr/bin/less"
+[ -z "$PAGER" ] && PAGER="less"
 
 # Set up select prompt
 PS3="Choice? "
 
 select_loop() {
-       ANY_FILES=$(/usr/bin/find . -type f)
-       ANY_FILES=$(echo ${ANY_FILES} | /bin/sed -e "s:\./::g")
+       ANY_FILES=$(find . -type f)
+       ANY_FILES=$(echo ${ANY_FILES} | sed -e "s:\./::g")
 
        if [[ -z ${ANY_FILES} ]]; then
                echo "No log items to read"
@@ -54,7 +58,7 @@ select_loop() {
                                                break
                                                ;;
                                        y|Y)
-                                               /usr/bin/rm -f ${FILE}
+                                               rm -f ${FILE}
                                                SUCCESS=$?
                                                if [[ ${SUCCESS} = 0 ]]; then
                                                        echo "Deleted ${FILE}"