Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
6ab7b1b915
Modificáronse 2 ficheiros con 8 adicións e 1 borrados
  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]);
 					return 1;
 			}
-		} else {
+		} else if ((!homeDir)||(strcmp(homeDir,argv[i]))) {
 			if (query.length())
 				query.push_back(' ');
 			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