From 9004c4a5ff7bfd0067fa616693d84b8afe69d9f4 Mon Sep 17 00:00:00 2001 From: epoch Date: Thu, 2 Apr 2020 08:15:12 +0000 Subject: added caching to map --- share/hackvr/examples/anonet_map/map | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share/hackvr/examples/anonet_map') diff --git a/share/hackvr/examples/anonet_map/map b/share/hackvr/examples/anonet_map/map index e983590..4dbbdbd 100755 --- a/share/hackvr/examples/anonet_map/map +++ b/share/hackvr/examples/anonet_map/map @@ -1,15 +1,15 @@ #!/bin/bash -paths="$(ncat --recv-only 21.41.41.1 64777 | sort | uniq | tee /var/cache/hackvr/anonet_data.new)" +paths="$(ncat --recv-only 21.41.41.1 64777 | sort | uniq | tee ${PREFIX}/var/cache/hackvr/anonet_data.new)" -MAP=/var/cache/hackvr/anonet_map.hackvr +MAP=${PREFIX}/var/cache/hackvr/anonet_map.hackvr #see if the data actually changed before regenerating this shit... -if cmp /var/cache/hackvr/anonet_data.new /var/cache/hackvr/anonet_data.old ; then +if cmp ${PREFIX}/var/cache/hackvr/anonet_data.new ${PREFIX}/var/cache/hackvr/anonet_data.old ; then cat $MAP exit 0 fi -mv /var/cache/hackvr/anonet_data.new /var/cache/hackvr/anonet_data.old +mv ${PREFIX}/var/cache/hackvr/anonet_data.new ${PREFIX}/var/cache/hackvr/anonet_data.old > $MAP -- cgit v1.2.3