Browse Source

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.)

Adam Ierymenko 11 years ago
parent
commit
6ab7b1b915
2 changed files with 8 additions and 1 deletions
  1. 1 1
      main.cpp
  2. 7 0
      testnet/clean-local-testnet.sh

+ 1 - 1
main.cpp

@@ -146,7 +146,7 @@ static int main(const char *homeDir,int argc,char **argv)
 					printHelp(stdout,argv[0]);
 					printHelp(stdout,argv[0]);
 					return 1;
 					return 1;
 			}
 			}
-		} else {
+		} else if ((!homeDir)||(strcmp(homeDir,argv[i]))) {
 			if (query.length())
 			if (query.length())
 				query.push_back(' ');
 				query.push_back(' ');
 			query.append(argv[i]);
 			query.append(argv[i]);

+ 7 - 0
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