Skip to content

Instantly share code, notes, and snippets.

@bixu
Last active August 29, 2015 14:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixu/e2620a2b0fcb6ed1830c to your computer and use it in GitHub Desktop.
Save bixu/e2620a2b0fcb6ed1830c to your computer and use it in GitHub Desktop.
Bootstrap pkgsrc in a SmartOS global zone
#!/bin/bash
# you can test by doing
# curl -sL https://gist.github.com/bixu/e2620a2b0fcb6ed1830c/raw/pkgsrc_bootstrap.sh | bash -sx
BOOTSTRAP_TARBALL=$(curl -sLk http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/ | grep href= | cut -d\" -f2 | tail -n1)
cd /
curl -k http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/$BOOTSTRAP_TARBALL | gzcat | tar -xf -
pkg_admin rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment