fixes for start script
authorThomasV <thomasv@gitorious>
Tue, 4 Mar 2014 21:23:53 +0000 (01:23 +0400)
committerThomasV <thomasv@gitorious>
Tue, 4 Mar 2014 21:23:53 +0000 (01:23 +0400)
start

diff --git a/start b/start
index 6bf6668..bd1db62 100755 (executable)
--- a/start
+++ b/start
@@ -24,12 +24,15 @@ if ! [ "$path" ]; then
     # we're actually forcing fulltree with this clause, which is ok if displaying v0.9 should use fulltree 
 fi
 
+rmdir $path --ignore-fail-on-non-empty
+
 if [ ! -d $path ]; then
     echo "Database not found in $path."
     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.gz" | tar -C $path --strip-components 1 -xvfz -
+       mkdir $path
+       wget -O - "http://foundry.electrum.org/leveldb-dump/electrum-fulltree-100-latest.tar.gz" | tar --extract --gunzip --strip-components 1 --directory $path --file -
     fi
 fi