Created
October 31, 2013 13:41
-
-
Save AlainODea/7249940 to your computer and use it in GitHub Desktop.
WIP: Replace one PKGSRC version with another on a SmartMachine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get list of installed packages | |
pkg_info | cut -d' ' -f 1 | sed 's/-[^-]*$//' > packages.list | |
# replace existing PKGSRC | |
rm -Rf /opt/local /var/db/pkgin | |
curl -s http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-$PKGSRC-$ARCH.tar.gz | gzcat | (cd /; tar -xpf -) | |
pkgin -y update | |
pkgin -y upgrade | |
# install current versions of previously installed software | |
cat packages.list | xargs pkgin -y install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment