summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-10-03 13:41:52 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-10-03 13:41:52 -0700
commit6ab7b1b9159fa9f85d99405da2e16f0faf324f91 (patch)
tree8f2bfa405c4777d945766d680db6278e1fc3b2a6
parentf853bc6a867d695ae126082fd75c4f8eccc7f05f (diff)
downloadinfinitytier-6ab7b1b9159fa9f85d99405da2e16f0faf324f91.tar.gz
infinitytier-6ab7b1b9159fa9f85d99405da2e16f0faf324f91.zip
Add local-testnet clean script, and make a really ugly hacky fix in main.c for the -q option. (All that personality stuff needs to be rewritten. Yuck.)
-rw-r--r--main.cpp2
-rwxr-xr-xtestnet/clean-local-testnet.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index e023b42e..b2de78ba 100644
--- a/main.cpp
+++ b/main.cpp
@@ -146,7 +146,7 @@ static int main(const char *homeDir,int argc,char **argv)
printHelp(stdout,argv[0]);
return 1;
}
- } else {
+ } else if ((!homeDir)||(strcmp(homeDir,argv[i]))) {
if (query.length())
query.push_back(' ');
query.append(argv[i]);
diff --git a/testnet/clean-local-testnet.sh b/testnet/clean-local-testnet.sh
new file mode 100755
index 00000000..1d6b7f0d
--- /dev/null
+++ b/testnet/clean-local-testnet.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+export PATH=/bin:/usr/bin:/usr/local/bin
+
+rm -rfv local-testnet/n????
+find local-testnet -type f ! -name 'identity.*' -print0 | xargs -0 rm -fv
+rm -rfv local-testnet/sn????/networks.d