I am having a go at creating my first one-click install app - the MoinMoin Wiki.
Trouble is my script exits after I run Moin's Python installation and the remaining part of my install script does not get executed. I can't see any error messages and the logs say the app was installed correctly.
Any ideas on what I am doing wrong? Install script extract shown below.
thanks
Andrew
Code: Select all
APPROOT="$PWD/html"
INSTANCE="$APPROOT/wiki"
echo "PWD: $PWD"
echo "APPROOT: $APPROOT"
echo "INSTANCE: $INSTANCE"
echo "Running the MoinMoin Python installer..."
cd "$APPROOT"
python setup.py install --force --record=install.log --prefix="$APPROOT/usr" --install-data="$APPROOT/usr"
#<---- the folowing lines never get executed ---->
echo "MoinMoin install completed with exit code: $?"
# Backup the wiki instance template folder structure
echo "Creating wiki instance backup..."
cp -R "$INSTANCE" "$APPROOT/wiki_instance_template"
echo "Wiki istance backup completed with exit code: $?"
# Copy moin.wsgi in to the wiki instance and edit it to point to the config file and the additional Python packages
sed -e "s:#sys.path.insert(0, '/path/to/wikiconfigdir'):sys.path.insert(0, '$INSTANCE'):" "$INSTANCE/server/moin.wsgi" > temp1
echo "sed1: $?"
sed -e "s:#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages'):sys.path.insert(0, '$APPROOT/usr/lib/python2.6/site-packages'):" temp1 > temp2
echo "sed2: $?"
cp temp2 "$INSTANCE/moin.wsgi"
rm temp1
rm temp2