#!/bin/bash cat < (C) 2012 Petr Kubanek, EOF with_db=1 download_dir=/tmp # process arguments while [ "x$1" != "x" ]; do arg=$1 shift case $arg in --help) cat </dev/null; then echo "/usr/local/lib is present in /etc/ld.so.conf" else echo "Adding /usr/local/lib to ld.so.conf" sudo echo -e "\n/usr/local/lib" >> /etc/ld.so.conf sudo ldconfig fi echo "Configuring RTS2" sudo ./rts2-init echo "Creating proper rts2.ini configuration file" cat conf/rts2.ini | sed -e "s/altitude = xxxx/altitude = 600/" -e "s/longitude = xxxx/longitude = 15/" -e "s/latitude = xxxx/latitude = 50/" > ${download_dir}/rts2.ini sudo cp ${download_dir}/rts2.ini /etc/rts2/rts2.ini if [ $with_db == 1 ]; then echo "Creating postgresql database" sudo createdb stars sudo psql stars <