Changes between Version 6 and Version 7 of howto/AdvancedDailyAdm
- Timestamp:
- May 22, 2021, 4:01:36 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/AdvancedDailyAdm
v6 v7 19 19 {{{ 20 20 declare prefix='/opt/local' 21 declare version=$( curl - -url 'https://raw.githubusercontent.com/macports/macports-base/master/config/RELEASE_URL' )21 declare version=$( curl -fs --url 'https://raw.githubusercontent.com/macports/macports-base/master/config/RELEASE_URL' ) 22 22 version=${version##*/v} 23 23 }}} … … 55 55 usage() { 56 56 cat <<EOT 57 purpose : to automate the whole install process 57 58 purpose : to automate the whole MacPorts install & update process 58 59 \${1} : action [ update (default) , install , setpaths , checkpaths , select , fixCLT ] 59 60 \${2} : macports base version ( default ${version} ) only for install 61 62 !!! the script has to be run with root privileges !!! 63 60 64 EOT 61 65 } … … 63 67 declare action=${1:-"update"} 64 68 [ ! -z ${2} ] && declare version=${2} 69 70 case ${action} in 71 ('-h'|'--help') 72 usage 73 exit 74 esac 75 76 if [[ ${EUID} -ne 0 ]] 77 then 78 cat <<EOT 79 80 +------------------------------------------------+ 81 | this script has to be run with root privileges I 82 +------------------------------------------------+ 83 please try again with "sudo ${0}" 84 85 EOT 86 usage 87 exit 88 fi 65 89 66 90 case ${action} in … … 132 156 if [ ! -e MacPorts-${version}.tar.gz ] 133 157 then 134 #https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0.tar.gz135 158 curl -L -O --url "https://github.com/macports/macports-base/releases/download/v${version}/MacPorts-${version}.tar.gz" 136 159 fi 137 160 138 161 rm -rf ./MacPorts-${version} 139 tar -zxf MacPorts-${version}.tar.gz 2>/dev/null \ 140 || { echo "error expanding MacPorts-${version}.tar.gz" ; exit } 162 tar -zxf MacPorts-${version}.tar.gz 2>/dev/null 141 163 142 164 cd MacPorts-${version} 143 #patch -p0 </Volumes/Bjarne/WebServer/MacPorts/newPorts/pathces/mp-base-no-progress-if-stdout-no-tty.patch144 #./configure LDFLAGS=-L/Developer/SDKs/MacOSX10.6.sdk/usr/X11/lib --prefix=${prefix}145 165 CC=/usr/bin/cc ./configure \ 146 166 --prefix=/opt/local \ … … 150 170 --enable-readline \ 151 171 && make SELFUPDATING=1 \ 152 && make install SELFUPDATING=1 \ 153 || { echo "error compiling MacPorts-${version}" ; exit } 172 && make install SELFUPDATING=1 154 173 155 174 # update MacPorts itself … … 177 196 178 197 {{{ 179 #!/ macports/bin/bash198 #!/usr/bin/env bash 180 199 181 200 # … … 190 209 echo '+----------------+' 191 210 192 declare installPath=${1:-'/ macports'}211 declare installPath=${1:-'/opt/local'} 193 212 declare rsyncMacportsOrg='/var/macports/sources/rsync.macports.org/release/ports' 194 213 … … 236 255 237 256 {{{ 238 #!/ macports/bin/bash239 240 declare prefix=${2:-"/macports"} 257 #!/usr/bin/env bash 258 259 source ./portDefaults 241 260 242 261 ( cd $( dirname ${0} ) … … 256 275 257 276 {{{ 258 #!/ macports/bin/bash259 260 declare prefix=${1:-"/macports"} 261 declare rsyncMacportsOrg="/var/macports/sources/rsync.macports.org/release/ports" 277 #!/usr/bin/env bash 278 279 source ./portDefaults 280 source ./defaultPaths 262 281 263 282 ( cd $( dirname ${0} )