~cgb-cs/appscale/appscale-tools

« back to all changes in this revision

Viewing changes to debian/appscale_build_source.sh

  • Committer: Chris Bunch
  • Date: 2011-06-26 03:33:59 UTC
  • mfrom: (238.1.10 trunk-tools)
  • Revision ID: cgb@cs.ucsb.edu-20110626033359-8pntrbyrh7c5fr6o
merged with main, and reverted infrastructure flag to allow iaas as an argument

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
DIST="source"
 
4
 
 
5
cd `dirname $0`/..
 
6
 
 
7
if [ ! -e ./debian/appscale_install_${DIST}.sh ]; then
 
8
    echo "${DIST} install is not supported."
 
9
    exit 1
 
10
fi
 
11
 
 
12
echo "${DIST} install"
 
13
 
 
14
# check runtime dependency
 
15
hash ssh 2>&- || { echo >&2 "The tools require shh but it's not installed.  Aborting."; exit 1; }
 
16
 
 
17
hash ruby1.8 2>&- || { echo >&2 "The tools require ruby1.8 but it's not installed or softlinked to ruby. If you have ruby installed and it is version 1.8, run 'ln -s ruby ruby1.8' in the directory the ruby binary resides in. Aborting."; exit 1; }
 
18
 
 
19
hash curl 2>&- || { echo >&2 "The tools require curl but it's not installed.  Aborting."; exit 1; }
 
20
echo "check"
 
21
 
 
22
ruby1.8 -e "require 'openssl'" || { echo >&2 "The tools require the ruby openssl library installed. Aborting." ; exit 1; }
 
23
echo "Requirements met. Installing tools"
 
24
 
 
25
# copy tools files
 
26
TARGETDIR=/usr/local/appscale-tools
 
27
mkdir -p $TARGETDIR
 
28
cp -rv bin lib sample_apps templates $TARGETDIR || exit 1
 
29
cp -v CHANGELOG LICENSE README $TARGETDIR || exit 1
 
30
 
 
31
# install scripts
 
32
 
 
33
bash debian/appscale_install_${DIST}.sh all
 
34
if [ $? -ne 0 ]; then
 
35
    echo "Unable to complete AppScale tools installation."
 
36
    exit 1
 
37
fi
 
38
echo "AppScale tools installation completed successfully!"