diff options
author | salo <salo@pkgsrc.org> | 2004-07-10 20:42:37 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2004-07-10 20:42:37 +0000 |
commit | 7adc0ac704e6e957e6db044bcf335e89440a7edb (patch) | |
tree | 7b11dc33d7297c9772522ab2c088b7669815f3ac /mk/install | |
parent | 447633f86805c68c1133c99d9b7f1262f2d4fdad (diff) | |
download | pkgsrc-7adc0ac704e6e957e6db044bcf335e89440a7edb.tar.gz |
Replace test -e with -d and -f respectively.
Fixes part of PR pkg/26235 by Georg Schwarz.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 6 | ||||
-rw-r--r-- | mk/install/install | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index 2652b3d3af5..8e30d2674d7 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -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 @@ DEINSTALL) 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 @@ POST-DEINSTALL) samplefile="$1"; file="$2" shift; shift - if [ -e "${file}" ]; then + if [ -f "${file}" ]; then modified_files="${modified_files} \"${file}\"" fi done diff --git a/mk/install/install b/mk/install/install index 3ddd0aff5dd..df8e063b963 100644 --- a/mk/install/install +++ b/mk/install/install @@ -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 @@ PRE-INSTALL) 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 @@ EOF 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 @@ EOF 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 @@ EOF 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 @@ EOF 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}" |