Skip to content

Instantly share code, notes, and snippets.

@l34marr
Created June 25, 2014 07:34
Show Gist options
  • Save l34marr/d4cd5d86287a0f7384e2 to your computer and use it in GitHub Desktop.
Save l34marr/d4cd5d86287a0f7384e2 to your computer and use it in GitHub Desktop.
Plone Installer for Codio
# 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.3/+download/Plone-4.3.3-UnifiedInstaller.tgz
echo "unpacking the installer"
tar xfz Plone-4.3.3-UnifiedInstaller.tgz
cd Plone-4.3.3-UnifiedInstaller
echo "installing (first pass)"
./install.sh standalone --target=$HOME/plone433 &
spinner $!
# the step above seems to only half install it so we brute force it a bit
echo "installing (second pass)"
cd ~/plone433/zinstance
bin/buildout &
spinner $!
echo "let's install some convenience commands"
wget https://gist.github.com/l34marr/06cd4a0b18b34ac7a115/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