[32709] branches/release_1_6/base/portmgr/dmg/postflight
jmpp at macports.org
jmpp at macports.org
Fri Jan 11 10:53:01 PST 2008
Revision: 32709
http://trac.macosforge.org/projects/macports/changeset/32709
Author: jmpp at macports.org
Date: 2008-01-11 10:53:00 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Don't dump stderr to /dev/null, as the errors (which should be printed to the install log) might help us debug problems.
Modified Paths:
--------------
branches/release_1_6/base/portmgr/dmg/postflight
Modified: branches/release_1_6/base/portmgr/dmg/postflight
===================================================================
--- branches/release_1_6/base/portmgr/dmg/postflight 2008-01-11 18:49:40 UTC (rev 32708)
+++ branches/release_1_6/base/portmgr/dmg/postflight 2008-01-11 18:53:00 UTC (rev 32709)
@@ -60,7 +60,7 @@
# backing up the original only if it exists and if it doesn't contain the ${OUR_STRING} identification string,
# which hints that we've already tweaked it and therefore already baked it up.
function write_setting () {
- if [ -f ${HOME}/.${CONF_FILE} ] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null 2>&1; then
+ if [ -f ${HOME}/.${CONF_FILE} ] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then
echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
/bin/cp -fp ${HOME}/.${CONF_FILE} "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
echo "An attempt to backup your original configuration file failed! Please set your MacPorts compatible environment manually."
@@ -104,7 +104,7 @@
# Determine the user's shell, in order to choose an appropriate configuration file we'll be tweaking.
# Exit nicely if the shell is any other than bash or tcsh, as that's considered non-standard.
-USHELL="$(basename "${SHELL}" 2>/dev/null)" || {
+USHELL="$(basename "${SHELL}")" || {
echo "An attempt to determine your shell name failed! Please set your MacPorts compatible environment manually."
update_macports
exit 1
@@ -127,22 +127,22 @@
# Adding our setting to the PATH variable if not already there:
-if ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv PATH" | grep ${PREFIX} > /dev/null 2>&1; then
+if ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv PATH" | grep ${PREFIX} > /dev/null; then
echo "Your shell already has the right PATH environment variable for use with MacPorts!"
else
write_setting PATH
fi
# We gather the path into a variable of our own for faster operation:
-ORIGINAL_MANPATH="$(${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv MANPATH" 2>/dev/null)"
+ORIGINAL_MANPATH="$(${SHELL} ${LOGIN_FLAG} -c "/usr/bin/printenv MANPATH")"
# Adding out setting to the MANPATH variable only if it exists:
-if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null 2>&1 || \
+if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null || \
# and following that, if it's not empty:
[ -z "${ORIGINAL_MANPATH}" ] || \
# or if it doesn't already contain our path:
- echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null 2>&1 || \
+ echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null || \
# or if there's no empty component somewhere in the middle of it:
- echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null 2>&1 || \
+ echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null || \
# or at the start of it:
[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ] || \
# or at the end of it:
@@ -153,7 +153,7 @@
fi
# Adding a DISPLAY variable only if we're running on Tiger or less and if it doesn't already exist:
-if (($(sw_vers -productVersion | awk -F . '{print $2}') >= 5)) || ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep DISPLAY" > /dev/null 2>&1; then
+if (($(sw_vers -productVersion | awk -F . '{print $2}') >= 5)) || ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep DISPLAY" > /dev/null; then
echo "Your shell already has the right DISPLAY environment variable for use with MacPorts!"
else
write_setting DISPLAY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080111/a11718e2/attachment-0001.html
More information about the macports-changes
mailing list