Changes between Version 20 and Version 21 of Migration
- Timestamp:
- Jan 29, 2010, 2:47:02 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Migration
v20 v21 29 29 Note that if you have specified variants which are not the default, you may need to install ports in an order other than the alphabetical order recorded in `myports.txt`. 30 30 31 === Automatically reinstall ports === #autoinstall31 === Automatically reinstall ports (EXPERIMENTAL) === #automatic 32 32 33 If you want to do the whole procedure automatically instead, including handling dependencies, you can run the following commands to build a Makefile for running the reinstalls in the right order. (Not needed If you already ran the steps in the previous section.) 33 A script has been written to automate Step 4 above, though it is still experimental. If it fails, you will just have to do it manually. 34 35 To use it, you will first need to run steps 1-3 as described above. Then: 36 4. Run these commands to download and execute the restore_ports script. (If you installed MacPorts from source and put its Tcl package somewhere other than /Library/Tcl, then you'll need to use the -t option when you run restore_ports.tcl; see `./restore_ports.tcl -h`. 34 37 {{{ 35 port installed |grep -v '^The following' | awk '{print $1}' > myports.txt 38 curl -O http://svn.macports.org/repository/macports/users/jmr/restore_ports/restore_ports.tcl 39 chmod +x restore_ports.tcl 40 sudo ./restore_ports.tcl myports.txt 36 41 }}} 37 {{{38 echo "all: $(cat myports.txt|tr '\n' ' ')" > Makefile.ports39 }}}40 {{{41 for port in $(cat myports.txt); do42 echo "$port: $(port deps $port|grep Dependencies:|sed -e 's/.*Dependencies: *//;s/,//g'|tr '\n' ' ')"43 printf "\tport -f uninstall $port\n\tport install $port\n"44 done | tee -a Makefile.ports45 }}}46 {{{47 make -f Makefile.ports48 }}}