Changeset 79751
- Timestamp:
- 06/24/11 14:01:07 (4 years ago)
- Location:
- branches/release_2_0
- Files:
-
- 10 edited
-
. (modified) (1 prop)
-
base (modified) (1 prop)
-
base/portmgr/dmg/InstallationCheck (modified) (1 diff)
-
base/portmgr/dmg/postflight (modified) (9 diffs)
-
base/portmgr/fedora/macports.spec (modified) (1 prop)
-
base/src/pextlib1.0/sha2.c (modified) (1 prop)
-
base/src/pextlib1.0/sha2.h (modified) (1 prop)
-
base/src/pextlib1.0/sha256cmd.c (modified) (1 prop)
-
base/src/pextlib1.0/sha256cmd.h (modified) (1 prop)
-
base/src/registry2.0/receipt_sqlite.tcl (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/release_2_0
-
branches/release_2_0/base
- Property svn:mergeinfo changed
/trunk/base merged: 79750
- Property svn:mergeinfo changed
-
branches/release_2_0/base/portmgr/dmg/InstallationCheck
r68593 r79751 1 #!/bin/ sh1 #!/bin/bash 2 2 # 3 3 # $Id$ -
branches/release_2_0/base/portmgr/dmg/postflight
r79597 r79751 58 58 function setup_configs { 59 59 for f in macports.conf pubkeys.conf sources.conf variants.conf ; do 60 if [ ! -f ${CONFIGPATH}/${f}]; then60 if [[ ! -f ${CONFIGPATH}/${f} ]]; then 61 61 echo "Copying ${f}.default to ${f}" 62 62 /bin/cp ${CONFIGPATH}/${f}.default ${CONFIGPATH}/${f} … … 88 88 # which hints that we've already tweaked it and therefore already backed it up. 89 89 function write_setting () { 90 if [ -f ${HOME}/.${CONF_FILE}] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then90 if [[ -f ${HOME}/.${CONF_FILE} ]] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then 91 91 echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts." 92 92 /bin/cp -fp ${HOME}/.${CONF_FILE} "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || { … … 118 118 # Delete the old registry1.0 directory 119 119 function delete_reg1 { 120 if [ -d ${REG1DIR}]; then120 if [[ -d ${REG1DIR} ]]; then 121 121 rm -vrf ${REG1DIR} 122 122 fi … … 126 126 function link_tcl_package { 127 127 # delete old directory if present 128 if ! test -L "${TCL_PACKAGE_DIR}/macports1.0" && test -d "${TCL_PACKAGE_DIR}/macports1.0"; then128 if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then 129 129 rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true 130 130 fi 131 if ! test -e "${TCL_PACKAGE_DIR}/macports1.0" && test -w "${TCL_PACKAGE_DIR}"; then131 if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -w "${TCL_PACKAGE_DIR}" ]]; then 132 132 ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true 133 133 fi … … 137 137 function create_run_user { 138 138 DSEDITGROUP=/usr/sbin/dseditgroup 139 if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then 140 if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then 141 echo "Creating group \"${RUNUSR}\"" 142 ${DSEDITGROUP} -q -o create -n . ${RUNUSR} 143 fi 144 if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then 145 echo "Creating user \"${RUNUSR}\"" 146 ${DSCL} -q . -create /Users/${RUNUSR} Password * 147 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1)) 148 ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}') 149 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /dev/null 150 ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false 151 fi 152 else 153 echo "Can't find ${DSCL} / ${DSEDITGROUP}, unable to create user \"${RUNUSR}\"" 154 exit 1 139 if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then 140 echo "Creating group \"${RUNUSR}\"" 141 ${DSEDITGROUP} -q -o create -n . ${RUNUSR} 142 fi 143 if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then 144 echo "Creating user \"${RUNUSR}\"" 145 ${DSCL} -q . -create /Users/${RUNUSR} Password * 146 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1)) 147 ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}') 148 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /dev/null 149 ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false 155 150 fi 156 151 } … … 180 175 ENV_COMMAND="setenv" 181 176 ASSIGN=" " 182 if [ -f ${HOME}/.tcshrc]; then177 if [[ -f ${HOME}/.tcshrc ]]; then 183 178 CONF_FILE=tcshrc 184 elif [ -f ${HOME}/.cshrc]; then179 elif [[ -f ${HOME}/.cshrc ]]; then 185 180 CONF_FILE=cshrc 186 181 else … … 193 188 ENV_COMMAND="export" 194 189 ASSIGN="=" 195 if [ -f ${HOME}/.bash_profile]; then190 if [[ -f ${HOME}/.bash_profile ]]; then 196 191 CONF_FILE=bash_profile 197 elif [ -f ${HOME}/.bash_login]; then192 elif [[ -f ${HOME}/.bash_login ]]; then 198 193 CONF_FILE=bash_login 199 194 else … … 221 216 if ! ${SHELL} ${LOGIN_FLAG} -c "/usr/bin/env | grep MANPATH" > /dev/null || \ 222 217 # and following that, if it's not empty: 223 [ -z "${ORIGINAL_MANPATH}"] || \218 [[ -z "${ORIGINAL_MANPATH}" ]] || \ 224 219 # or if it doesn't already contain our path: 225 220 echo "${ORIGINAL_MANPATH}" | grep ${MANPAGES} > /dev/null || \ … … 227 222 echo "${ORIGINAL_MANPATH}" | grep :: > /dev/null || \ 228 223 # or at the start of it: 229 [ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')"] || \224 [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $1}')" ]] || \ 230 225 # or at the end of it: 231 [ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')"]; then226 [[ -z "$(echo "${ORIGINAL_MANPATH}" | awk -F : '{print $NF}')" ]]; then 232 227 echo "Your shell already has the right MANPATH environment variable for use with MacPorts!" 233 228 else -
branches/release_2_0/base/portmgr/fedora/macports.spec
- Property svn:mergeinfo changed
/trunk/base/portmgr/fedora/macports.spec merged: 79750
- Property svn:mergeinfo changed
-
branches/release_2_0/base/src/pextlib1.0/sha2.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/release_2_0/base/src/pextlib1.0/sha2.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/release_2_0/base/src/pextlib1.0/sha256cmd.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/release_2_0/base/src/pextlib1.0/sha256cmd.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/release_2_0/base/src/registry2.0/receipt_sqlite.tcl
- Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset
for help on using the changeset viewer.

