Skip to content

Instantly share code, notes, and snippets.

@pigeonflight
Created April 16, 2014 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigeonflight/10941935 to your computer and use it in GitHub Desktop.
Save pigeonflight/10941935 to your computer and use it in GitHub Desktop.
Plone Installer for Codio.com
# spinner borrowed from http://fitnr.com/showing-a-bash-spinner.html
spinner()
{
local pid=$1
local delay=0.75
local spinstr='|/-\'
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
local spinstr=$temp${spinstr%"$temp"}
sleep $delay
printf "\b\b\b\b\b\b"
done
printf " \b\b\b\b"
}
echo "getting the installer"
wget https://launchpad.net/plone/4.3/4.3.2/+download/Plone-4.3.2-UnifiedInstaller.tgz
echo "unpacking the installer"
tar xfz Plone-4.3.2-UnifiedInstaller.tgz
#echo "adding an altered versions.cfg file"
#cd Plone-4.3.2-UnifiedInstaller/base_skeleton
cd Plone-4.3.2-UnifiedInstaller
#wget https://gist.github.com/pigeonflight/6068222/raw/000849ebd9c4bf4b66a28b9dc4177b63e2dcfdf2/versions.cfg -O versions.cfg
#cd ..
echo "installing (first pass)"
./install.sh zeo --target=$HOME/workspace &
spinner $!
# the step above seems to only half install it so we brute force it a bit
echo "installing (second pass)"
cd ~/workspace/zeocluster
bin/buildout &
spinner $!
echo "let's install some convenience commands"
wget https://gist.github.com/pigeonflight/6089807/download -O plonecommands.tgz
mkdir -p ~/bin
tar xfz plonecommands.tgz
cp `tar tfz plonecommands.tgz |head -1`plone* ~/bin/
chmod +x ~/bin/plone*
rm -rf `tar tfz plonecommands.tgz |head -1`
rm plonecommands.tgz
echo 'PATH=$PATH:$HOME/bin' >> ~/.bashrc
echo 'export PATH' >> ~/.bashrc
PATH=$PATH:$HOME/bin
export PATH
parts install tmux
echo "***********************************"
echo "** **"
echo "** Plone on N2O install complete **"
echo "** **"
echo "** the commands will not work in **"
echo "** this console. Close this **"
echo "** console now and run: **"
echo "** **"
echo "** plone-start.sh **"
echo "** **"
echo "** in a newly opened console **"
echo "** **"
echo "** **"
echo "***********************************"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment