start: strip one dir on tar unpack, electrum_config vars
authorEagle[TM] <eagletm@mpex.net>
Sun, 23 Feb 2014 01:46:30 +0000 (02:46 +0100)
committerEagle[TM] <eagletm@mpex.net>
Sun, 23 Feb 2014 01:46:30 +0000 (02:46 +0100)
start

diff --git a/start b/start
index c76393c..9868ce1 100755 (executable)
--- a/start
+++ b/start
@@ -3,7 +3,7 @@
 electrum_config="/etc/electrum.conf"
 
 if [ ! -f $electrum_config ]; then
-    echo "/etc/electrum.conf does not exist"
+    echo "$electrum_config does not exist"
     exit
 fi
 
@@ -12,8 +12,9 @@ path=`grep path_fulltree $electrum_config |awk -F\= '{print $2}'`
 #needs more hardening against double definiton of variable, dismiss commented ones
 
 if ! [ "$path" ]; then
-    echo "Variable path_fulltree not set in /etc/electrum.conf"
+    echo "Variable path_fulltree not set in $electrum_config"
     exit
+    # we're actually forcing fulltree with this clause, which is ok if displaying v0.9 should use fulltree 
 fi
 
 if [ ! -d $path ]; then
@@ -21,7 +22,7 @@ if [ ! -d $path ]; then
     read -p "Do you want to download it from the Electrum foundry to $path ? " -n 1 -r
     echo
     if [[ $REPLY =~ ^[Yy]$ ]]; then
-       wget -O - "http://foundry.electrum.org/leveldb-dump/electrum-fulltree-100-latest.tar" | tar -C $path -xvf -
+       wget -O - "http://foundry.electrum.org/leveldb-dump/electrum-fulltree-100-latest.tar" | tar -C $path --strip-components 1 -xvf -
     fi
 fi