pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Replace test -e with -d and -f respectively.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5dae20b5f6bb
branches:  trunk
changeset: 477871:5dae20b5f6bb
user:      salo <salo%pkgsrc.org@localhost>
date:      Sat Jul 10 20:42:37 2004 +0000

description:
Replace test -e with -d and -f respectively.
Fixes part of PR pkg/26235 by Georg Schwarz.

diffstat:

 mk/install/deinstall |   6 +++---
 mk/install/install   |  20 ++++++++++----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (113 lines):

diff -r b74cabce87d0 -r 5dae20b5f6bb mk/install/deinstall
--- a/mk/install/deinstall      Sat Jul 10 20:19:11 2004 +0000
+++ b/mk/install/deinstall      Sat Jul 10 20:42:37 2004 +0000
@@ -1,6 +1,6 @@
 # start of deinstall
 #
-# $NetBSD: deinstall,v 1.27 2004/04/12 11:49:09 chris Exp $
+# $NetBSD: deinstall,v 1.28 2004/07/10 20:42:37 salo Exp $
 
 eval set -- ${PKG_USERS}
 for userset; do
@@ -111,7 +111,7 @@
                        shift; shift
 
                        if [ ! "${file}" -ef "${samplefile}" -a         \
-                            -e "${file}" -a -e "${samplefile}" ]; then
+                            -f "${file}" -a -f "${samplefile}" ]; then
                                if ${CMP} -s "${file}" "${samplefile}"; then
                                        ${RM} -f "${file}"
                                fi
@@ -127,7 +127,7 @@
                samplefile="$1"; file="$2"
                shift; shift
 
-               if [ -e "${file}" ]; then
+               if [ -f "${file}" ]; then
                        modified_files="${modified_files} \"${file}\""
                fi
        done
diff -r b74cabce87d0 -r 5dae20b5f6bb mk/install/install
--- a/mk/install/install        Sat Jul 10 20:19:11 2004 +0000
+++ b/mk/install/install        Sat Jul 10 20:42:37 2004 +0000
@@ -1,6 +1,6 @@
 # start of install
 #
-# $NetBSD: install,v 1.30 2004/01/08 14:19:29 grant Exp $
+# $NetBSD: install,v 1.31 2004/07/10 20:42:37 salo Exp $
 
 if [ -z "${CONF_FILES}" -a -z "${CONF_FILES_PERMS}" -a                 \
      -z "${SUPPORT_FILES}" -a -z "${SUPPORT_FILES_PERMS}" -o           \
@@ -117,7 +117,7 @@
                                print;                                  \
                        }'                                              \
                `
-               if [ -d $sysconfdir -a ! -e ${PKG_SYSCONFDIR} ]; then
+               if [ -d $sysconfdir -a ! -d ${PKG_SYSCONFDIR} ]; then
                        ${MKDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}`
                        ${LN} -sf $sysconfdir ${PKG_SYSCONFDIR}
                fi
@@ -241,13 +241,13 @@
                                msgadd ""
                        fi
                        msgadd "#${file} (m=@CONF_FILES_MODE@)"
-               elif [ -e "${file}" ]; then
+               elif [ -f "${file}" ]; then
                        if [ ! "${file}" -ef "${samplefile}" ]; then
                                ${ECHO} "       ${file} already exists, example file is"
                                ${ECHO} "           ${samplefile}"
                        fi
                else
-                       if [ -e "${samplefile}" ]; then
+                       if [ -f "${samplefile}" ]; then
                                ${ECHO} "       ${file}"
                                ${CP} "${samplefile}" "${file}"
                                ${CHMOD} @CONF_FILES_MODE@ "${file}"
@@ -267,13 +267,13 @@
                                msgadd ""
                        fi
                        msgadd "#${file} (m=@SUPPORT_FILES_MODE@)"
-               elif [ -e "${file}" ]; then
+               elif [ -f "${file}" ]; then
                        if [ ! "${file}" -ef "${samplefile}" ]; then
                                ${ECHO} "       ${file} already exists, example file is"
                                ${ECHO} "           ${samplefile}"
                        fi
                else
-                       if [ -e "${samplefile}" ]; then
+                       if [ -f "${samplefile}" ]; then
                                ${ECHO} "       ${file}"
                                ${CP} "${samplefile}" "${file}"
                                ${CHMOD} @SUPPORT_FILES_MODE@ "${file}"
@@ -294,13 +294,13 @@
                                msgadd ""
                        fi
                        msgadd "#${file} (o=${owner}, g=${group}, m=${mode})"
-               elif [ -e ${file} ]; then
+               elif [ -f ${file} ]; then
                        if [ ! "${file}" -ef "${samplefile}" ]; then
                                ${ECHO} "       ${file} already exists, example file is"
                                ${ECHO} "           ${samplefile}"
                        fi
                else
-                       if [ -e "${samplefile}" ]; then
+                       if [ -f "${samplefile}" ]; then
                                ${ECHO} "       ${file}"
                                ${CP} "${samplefile}" "${file}"
                                ${CHOWN} "${owner}" "${file}"
@@ -323,13 +323,13 @@
                                msgadd ""
                        fi
                        msgadd "#${file} (m=@RCD_SCRIPTS_MODE@)"
-               elif [ -e "${file}" ]; then
+               elif [ -f "${file}" ]; then
                        if [ ! "${file}" -ef "${samplefile}" ]; then
                                ${ECHO} "       ${file} already exists, example file is"
                                ${ECHO} "           ${samplefile}"
                        fi
                else
-                       if [ -e "${samplefile}" ]; then
+                       if [ -f "${samplefile}" ]; then
                                ${ECHO} "       ${file}"
                                ${CP} "${samplefile}" "${file}"
                                ${CHMOD} @RCD_SCRIPTS_MODE@ "${file}"



Home | Main Index | Thread Index | Old Index