From f7ecb8b610e1cc2029b588c8cdc4c073ea4faca5 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 5 Jun 2019 17:05:45 +0100 Subject: Ensure bookgraph uses directory name even when run with . for current dir, and ensure temp dirs are destroyed --- bookgraphv2.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bookgraphv2.sh') diff --git a/bookgraphv2.sh b/bookgraphv2.sh index 9984ede..3f6cfaa 100644 --- a/bookgraphv2.sh +++ b/bookgraphv2.sh @@ -18,7 +18,8 @@ find "$1/best" -maxdepth 1 -type f -name '*hocr' | while read i; do printf '%s\t%d\n' "$n" "$c" >> "$t" done -b=`basename "$1"` +r=`readlink -f "$1"` +b=`basename "$r"` gp=`mktemp` printf ' @@ -36,4 +37,4 @@ quit ' "$b" "$1/${b}_bookgraph.png" "$t" >> "$gp" gnuplot "$gp" -#rm -f "$t" "$gp" +rm -f "$t" "$gp" -- cgit v1.2.1-24-ge1ad