Commit 51117a73 authored by anarcat's avatar anarcat

delete install.sh, we now recommend using hostmaster-install directly

parent 3fcbb0c6
#! /bin/sh
# $Id$
########################################################################
# Aegir quick install script
#
# This script is just a wrapper to the hostmaster-install command, which
# is part of the provision module. It is designed to be quickly
# downloaded and ran as the Aegir user (created as per the INSTALL.txt)
# and bootstrap aegir by downloading drush and provision.
#
# The real work happens in PHP, within the hostmaster-install command.
#
# It should keep to strict POSIX shell syntax to ensure maximum
# portability. The aim here is to ease the burden allow people using
# various platforms to zip through the install quicker.
#
# This script also *DOES NOT CHECK* if the requirements specified in
# INSTALL.txt have been met. It's up to the admin to follow the proper
# install instructions or use the packages provided by their platform.
########################################################################
# This script takes the following steps:
#
# 1. downloads drush in $AEGIR_HOME
# 2. downloads provision in $AEGIR_HOME/.drush
# 3. delegate the rest of the install to hostmaster-install
########################################################################
# guess the aegir version based on the info file
AEGIR_VERSION="HEAD"
DRUSH_VERSION=7.x-4.4
########################################################################
# functions
# noticeable messages
msg() {
echo "==> $*"
}
########################################################################
# Main script
AEGIR_HOME="$HOME"
AEGIR_HOST=`uname -n`
DRUSH="$AEGIR_HOME/drush/drush.php"
if [ `whoami` = "root" ] ; then
msg "This script should be ran as a non-root user"
exit 1
fi
# we need to check both because some platforms (like SunOS) return 0 even if the binary is not found
if which drush 2> /dev/null && which drush | grep -v 'no drush in' > /dev/null; then
msg "Drush is in the path, good"
DRUSH=drush
elif [ -x $DRUSH ] ; then
msg "Drush found in $DRUSH, good"
DRUSH="php $AEGIR_HOME/drush/drush.php"
else
msg "Installing drush in $AEGIR_HOME"
cd $AEGIR_HOME
wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz
gunzip -c drush-$DRUSH_VERSION.tar.gz | tar -xf -
rm drush-$DRUSH_VERSION.tar.gz
DRUSH="php $AEGIR_HOME/drush/drush.php"
fi
if $DRUSH help > /dev/null ; then
msg "Drush seems to be functioning properly"
else
msg "Drush is broken ($DRUSH help failed)"
exit 1
fi
if $DRUSH help | grep "^ provision-install" > /dev/null ; then
msg "Provision already seems to be installed"
else
msg "Installing provision backend in $AEGIR_HOME/.drush"
mkdir -p $AEGIR_HOME/.drush
if [ "$AEGIR_VERSION" = "HEAD" ]; then
git clone http://git.drupal.org/project/provision.git $AEGIR_HOME/.drush/provision
else
cd $AEGIR_HOME/.drush
wget http://ftp.drupal.org/files/projects/provision-$AEGIR_VERSION.tar.gz
gunzip -c provision-$AEGIR_VERSION.tar.gz | tar -xf -
rm provision-$AEGIR_VERSION.tar.gz
fi
fi
msg "Installing the frontend"
$DRUSH hostmaster-install --version=$AEGIR_VERSION $@
#!/bin/sh -e
# simple prompt, copied from install.sh
# simple prompt
prompt_yes_no() {
while true ; do
printf "$* [Y/n] "
......@@ -49,13 +49,12 @@ cat <<EOF
The following operations will be done:
1. change the makefile to download tarball
2. change the install.sh.txt version
3. change the upgrade.sh.txt version
4. display the resulting diff
5. commit those changes to git
6. lay down the tag (prompting you for a changelog)
7. revert the commit
8. (optionally) push those changes
2. change the upgrade.sh.txt version
3. display the resulting diff
4. commit those changes to git
5. lay down the tag (prompting you for a changelog)
6. revert the commit
7. (optionally) push those changes
The operation can be aborted before step 6 and 9. Don't forget that as
long as changes are not pushed upstream, this can all be reverted (see
......@@ -77,9 +76,6 @@ echo changing hostmaster-install version
sed -i'.tmp' -e"s/version *=.*$/version=$version/" provision.info
git add provision.info && rm provision.info.tmp
echo changing install.sh.txt version
sed -i'.tmp' -e"s/AEGIR_VERSION=.*$/AEGIR_VERSION=\"$version\"/" install.sh.txt && git add install.sh.txt && rm install.sh.txt.tmp
echo changing upgrade.sh.txt version
sed -i'.tmp' -e"s/AEGIR_VERSION=.*$/AEGIR_VERSION=\"$version\"/" upgrade.sh.txt && git add upgrade.sh.txt && rm upgrade.sh.txt.tmp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment