From fd33f65d2768ed74346f509a4dd53b72c35bee23 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 2 Mar 2024 05:33:23 +0200 Subject: Do the processing in a temp dir --- bin/ak-cjdns-scanner | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/ak-cjdns-scanner b/bin/ak-cjdns-scanner index ef78d2f..875852d 100755 --- a/bin/ak-cjdns-scanner +++ b/bin/ak-cjdns-scanner @@ -11,6 +11,9 @@ then exit 1 fi +TEMPDIR="$(mktemp -d)" +AK_ZPEERSFILE="$HOME/.arching-kaos/peersFile" +cd $TEMPDIR counter=0 printf '[' > walk.aknet dumpLinks \ @@ -38,3 +41,5 @@ done printf ']' >> walk.aknet mv walk.aknet $AK_ZPEERSFILE + +rm -rf $TEMPDIR -- cgit v1.2.3