Commit 4962c7c4 by Yannick Körber

Merge branch 'master' of git-int.hb.dfki.de:hysociatea/TECS

parents bc643e7c 8e61e25c
export TECS=`pwd`
#Check preconditions (Packaging Tools available)
echo -n "Check cmake .. "
type cmake > /dev/null || { echo "failed - please install cmake first"; exit 1; }
echo "Ok"
echo -n "Check mvn .. "
type mvn > /dev/null || { echo "failed - please install maven first"; exit 1; }
echo "Ok"
echo -n "Check pip2.7 .. "
type pip2.7 > /dev/null || { echo "failed - please install pip2.7 first"; exit 1; }
echo "Ok"
echo -n "Check gem .. "
type gem > /dev/null || { echo "failed - please install gem first"; exit 1; }
echo "Ok"
echo -n "Check mono .. "
type mono > /dev/null || { echo "failed - please install gem first"; exit 1; }
echo "Ok"
sleep 2
#Install C++ using cmake, make, make install
echo "Installing libtecs cpp"
sleep 1
cd $TECS/libtecs/cpp
rm -rf build
mkdir build
cd build
cmake .. || { echo "Creating Makefile failed" ; exit 1; }
make || { echo "Could not make cpp" ; exit 1; }
echo "Please provide super user password to install the static library"
sudo make install || { echo "Could not install cpp libtecs" ; exit 1; }
echo "Successfully Installed libtecs C++"
echo ""
#Install C# which means compiling the dll using mono
echo "Installing libtecs csharp"
sleep 1
cd $TECS/libtecs/csharp
./build.sh
echo "Successfully Installed libtecs C#"
echo ""
#Install Java using libtecs
echo "Installing libtecs java"
sleep 1
cd $TECS/libtecs/java
mvn install || { echo "Could not install libtecs java."; exit 1; }
echo "Successfully Installed libtecs Java"
echo ""
#Install python using pip
echo "Installing libtecs python"
sleep 1
cd $TECS/libtecs/py
./install.sh || { echo "Could not install libtecs python."; exit 1; }
echo "Successfully Installed libtecs Python"
echo ""
#Install ruby using gem
echo "Installing libtecs ruby"
sleep 1
cd $TECS/libtecs/rb
./build.sh || { echo "Could not build libtecs ruby."; exit 1; }
sudo gem install libtecs || { echo "Could not instlal libtecs ruby."; exit 1; }
echo "Successfully Installed libtecs Ruby"
echo ""
#Installation of tecs-server
echo "Installing tecs-server"
sleep 1
cd $TECS/tecs-server
./install-server.sh || { echo "Could not install tecs-server"; exit 1; }
echo "Successfully Installed tecs-server"
echo ""
mkdir -p target
dmcs src/*.cs \
{ dmcs src/*.cs \
../../basetypes/csharp/de/dfki/tecs/basetypes/*.cs \
src/misc/*.cs \
src/udp/*.cs \
......@@ -9,5 +9,6 @@ dmcs src/*.cs \
-r:./libs/Thrift.dll \
-target:library \
-out:target/libtecs.dll \
&& echo "Successfully generated target/libtecs.dll"
|| { echo "Could not copy to /opt/TECS/"; exit 1; } \
} && echo "Successfully generated target/libtecs.dll"
#!/bin/bash
cp -R ../../basetypes/py/* src/
sudo pip2.7 install --upgrade .
sudo pip2.7 install --upgrade . || { echo "Could not install libtecs python"; exit 1; }
cp ../../basetypes/rb/* lib/
gem build libtecs.gemspec
gem build libtecs.gemspec || { echo "Could not create gem libtecs"; exit 1; }
echo "Use 'gem install libtecs' to install"
#!/bin/bash
if [ $EUID != 0 ]; then
mvn install || exit
sudo "$0" "$@"
mvn install || { echo "Could not build tecs-server"; exit 1; }
sudo "$0" "$@" || { echo "Could not install tecs-server"; exit 1; }
exit $?
fi
mkdir -v -p /opt/TECS/
cp -v target/tecs-server.jar /opt/TECS/ && echo "Installed /opt/tecs-server.jar"
echo "#!/bin/bash" > /usr/bin/tecs-server
mkdir -v -p /opt/TECS/ || { echo "Could not create /opt/TECS/"; exit 1; }
cp -v target/tecs-server.jar /opt/TECS/ || { echo "Could not copy to /opt/TECS/"; exit 1; }
echo "#!/bin/bash" > /usr/bin/tecs-server || { echo "Could not create start script "; exit 1; }
echo 'java -jar /opt/TECS/tecs-server.jar $@' >> /usr/bin/tecs-server
chmod +x /usr/bin/tecs-server && echo "Installed /usr/bin/tecs-server"
chown 777 /usr/bin/tecs-server
......
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