Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # skip if we already have the env set up
  4. if [[ ! -e /content/pkgsrc ]]; then
  5. PKGSRC_REPO_URL=$(awk '{ print $2 }' FS='=' /opt/local/etc/pkg_install.conf)
  6. PKGSRC_BRANCH=$(awk '{ print $(NF-2) }' FS='/' /opt/local/etc/pkg_install.conf)
  7. PKGSRC_BINPKG_SITES=${PKGSRC_REPO_URL%/*}
  8.  
  9. pkgin -y in gcc47 git-base
  10.  
  11. mkdir -p /content/{distfiles,packages}
  12.  
  13. ( cd /content
  14. git clone git://github.com/joyent/pkgsrc.git
  15. cd pkgsrc
  16. git checkout joyent/release/${PKGSRC_BRANCH}
  17.  
  18. git submodule init
  19. git submodule update
  20. )
  21.  
  22. cat >> /opt/local/etc/mk.conf << EOF
  23. #
  24. #
  25. DISTDIR= /content/distfiles
  26. PACKAGES= /content/packages
  27. WRKOBJDIR= /var/tmp/pkgsrc-build
  28. #
  29. ALLOW_VULNERABLE_PACKAGES= yes
  30. SKIP_LICENSE_CHECK= yes
  31. #
  32. MAKE_JOBS= 8
  33. #
  34. FETCH_USING= curl
  35. #
  36. # Adjust BINPKG_SITES, depending upon the dataset chosen, it should be the URL
  37. # from /opt/local/etc/pkgin/repositories.conf without the trailing 'All'.
  38. #
  39. BINPKG_SITES= ${PKGSRC_BINPKG_SITES}/
  40. DEPENDS_TARGET= bin-install
  41. EOF
  42.  
  43. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement