From b126700ab32e59a76628e578c58c09f43a92b006 Mon Sep 17 00:00:00 2001 From: davor Date: Thu, 9 Aug 2012 14:51:31 +0200 Subject: Added default config file. --- 4store-install | 2 ++ config.sh | 1 + install | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/4store-install b/4store-install index 66b1b95..30f6c59 100755 --- a/4store-install +++ b/4store-install @@ -25,6 +25,8 @@ cmd="make install" && run_cmd "$cmd" "Make Install" # Config echo "if echo \"\$LD_LIBRARY_PATH\" | grep -v \"$FST/lib\">/dev/null 2>&1; then export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:$FST/lib\"; fi" >> "$FST_CONF" +if ! cat "$OT_DEFAULT_CONFIG" | grep "four_store">/dev/null 2>&1; then echo "$four_store = { :uri => 'http://localhost:8088', :user => '', :password => '' }" >> $OT_DEFAULT_CONFIG; fi + echo "$SELF configuration has been stored in '$FST_CONF'." if ! grep "$FST_CONF" $OT_UI_CONF >/dev/null 2>&1; then echo '. '$FST_CONF >> $OT_UI_CONF diff --git a/config.sh b/config.sh index e22c3f2..d688e5c 100755 --- a/config.sh +++ b/config.sh @@ -31,6 +31,7 @@ R_CONF="$HOME/.opentox/sh_R" RAPTOR2_CONF="$HOME/.opentox/sh_RAPTOR2" RASQAL_CONF="$HOME/.opentox/sh_RASQAL" OT_UI_CONF="$HOME/.opentox/opentox-ui.sh" +OT_DEFAULT_CONFIG="$HOME/.opentox/config/default.rb" OB_VER="openbabel-$OB_NUM_VER" OB_DEST="$OT_PREFIX/$OB_VER" diff --git a/install b/install index dbd9fbc..5211edd 100755 --- a/install +++ b/install @@ -37,7 +37,9 @@ sudo echo -n "" echo [ -f $OT_PREFIX/install/utils.sh ] || (cmd="mkdir -p $OT_PREFIX/install && cp utils.sh $OT_PREFIX/install" && run_cmd "$cmd" "Install utils.sh to OT_PREFIX") -[ -f $HOME/.opentox/config/install/config.sh ] || (cmd="mkdir -p $HOME/.opentox/config/install && cp config.sh $HOME/.opentox/config/install" && run_cmd "$cmd" "Install config.sh to CONFIG (~/.opentox)") +[ -f $HOME/.opentox/config/install/config.sh ] || (cmd="mkdir -p $HOME/.opentox/config/install && cp config.sh $HOME/.opentox/config/install" && run_cmd "$cmd" "Install config.sh to CONFIG (~/.opentox/config)") +[ -f $OT_DEFAULT_CONFIG ] || (cmd="echo '$aa = { :uri => nil }' > $OT_DEFAULT_CONFIG" && run_cmd "$cmd" "Install default.rb to CONFIG (~/.opentox/config)") + . ./base-install # Debian specific; disable this for others. ./raptor2-install # Download, compile and build raptor2. Install to OT_PREFIX. -- cgit v1.2.3