Commit 955adef8 authored by gerd's avatar gerd

fixes


git-svn-id: https://gps.dynxs.de/private/svn/app-plasma/trunk@264 55289a75-7b90-4627-9e07-ffb4263930b2
parent cb4bc5ed
......@@ -75,6 +75,17 @@ done
if [ -f /etc/debian_version ]; then
os="debian"
if [ -f /etc/apt/sources.list ]; then
if grep /ubuntu /etc/apt/sources.list >/dev/null; then
rootmeth=sudo
fi
fi
elif [ -f /etc/redhat-release ]; then
os="redhat"
fi
if [ -z "$rootmeth" ]; then
rootmeth=su
fi
######################################################################
......@@ -86,6 +97,11 @@ debian_build_pkgs="build-essential wget gzip bzip2 patch m4 libpq-dev \
debian_namenode_pkgs="libpq5 libpcre3 postgresql"
debian_datanode_pkgs="libpq5 libpcre3"
redhat_build_pkgs="gcc wget gzip bzip2 patch m4 pcre make postgresql \
postgresql-server pcre-devel postgresql-devel"
redhat_namenode_pkgs="pcre postgresql postgresql-server"
redhat_datanode_pkgs="pcre postgresql"
pkgs=""
case "$os,$mode" in
debian,build)
......@@ -94,6 +110,12 @@ case "$os,$mode" in
pkgs="$debian_namenode_pkgs" ;;
debian,datanode)
pkgs="$debian_datanode_pkgs" ;;
redhat,build)
pkgs="$redhat_build_pkgs" ;;
redhat,namenode)
pkgs="$redhat_namenode_pkgs" ;;
redhat,datanode)
pkgs="$redhat_datanode_pkgs" ;;
esac
pscript=""
......@@ -102,6 +124,9 @@ case "$os" in
debian)
pscript="apt-get install $pkgs"
pmsg="installing packages" ;;
redhat)
pscript="yum install $pkgs"
pmsg="installing packages" ;;
esac
######################################################################
......@@ -112,7 +137,7 @@ thisuser=`id -u`
thisgroup=`id -g`
rscript=""
rmsg=""
if [ mode = "build" ]; then
if [ $mode = "build" ]; then
rscript="mkdir -p '$root'; chown $thisuser:$thisgroup '$root'"
rmsg="preparing $root"
fi
......@@ -134,13 +159,16 @@ if [ -n "$pscript" -o -n "$rscript" ]; then
echo "*******************************************************************"
echo "* Doing as root: $msg"
echo "*******************************************************************"
echo "Method to become root: $rootmeth"
echo " (if this does not work for you, restart the script with the"
echo " right option: -su, -sudo, or -ssh)"
fi
case "$rootmeth" in
su)
su -c "$script" ;;
sudo)
sudo "$script" ;;
sudo sh -c "$script" ;;
ssh)
ssh root@localhost "$script" ;;
none)
......@@ -165,15 +193,17 @@ echo "*******************************************************************"
echo "* Using $tmpdir for bootstrapping GODI"
echo "*******************************************************************"
gv="godi-rocketboost-20091222"
mkdir $tmpdir
cd $tmpdir
wget http://download.camlcity.org/download/godi-rocketboost-20091222.tar.gz
tar xzf godi-rocketboost-20091222.tar.gz
cd godi-rocketboost-20091222
wget http://download.camlcity.org/download/$gv.tar.gz
tar xzf $gv.tar.gz
cd ./$gv
echo | ./bootstrap --prefix "$root/." --section 3.11
PATH="/opt/$root/bin:/opt/$root/sbin:$PATH"
PATH="$root/bin:$root/sbin:$PATH"
export PATH
./bootstrap_stage2
......@@ -193,6 +223,7 @@ echo "GODI_BUILD_SITES+=http://www.ocaml-programming.de/godi-build/ocamlnet3/" >
echo "GODI_OCAMLGRAPH_VIEWER=no" >>"$root/etc/godi.conf"
godi_console update
godi_console perform -build godi-ocamlnet
godi_console perform -build godi-plasma
echo "*******************************************************************"
......
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