Created
February 27, 2014 01:29
-
-
Save sevaine/9242470 to your computer and use it in GitHub Desktop.
Build executable tarball
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
### header.sh | |
#!/bin/sh | |
AWK=$(which awk 2>/dev/null) | |
PACKAGES="ruby rubygems git puppet" | |
TAR_FILENAME="puppetmaster_build.tar.gz" | |
TMPDIR=$(mktemp -d /tmp/NNNNN) | |
LINES=$(grep -n '###ENDSCRIPT###' $0 | cut -d':' -f1) | |
TAR_LINES=$(expr $(wc -l $0) - ${LINES}) | |
tail -n ${TAR_LINES} $0 | cd ${TMPDIR} && tar zxvf - | |
sudo yum -y install ${PACKAGES} | |
sudo gem install rake bundler | |
cd ${TMPDIR}/puppetmaster_build && rake | |
###ENDSCRIPT### | |
### composite.sh | |
#!/bin/sh | |
cat $1 $2 > output.tar.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what I ended up with:
the unset stuff is because I use rvm on my vagrant host.