From b5a7d8c50cf8b740b65ec38e08b2a6fa8b845c3e Mon Sep 17 00:00:00 2001 From: Brahmaji Mutthoju Date: Sun, 4 Jul 2021 09:41:49 +0530 Subject: [PATCH] Fixed issue with .tmp not found --- src/_adr_add_link | 5 ++++- src/_adr_remove_status | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/_adr_add_link b/src/_adr_add_link index 9814e45..b3fa7b0 100755 --- a/src/_adr_add_link +++ b/src/_adr_add_link @@ -25,4 +25,7 @@ awk -v link_type="$link_type" -v target="$(basename $target)" -v target_title="$ { print } ' "$source" > "$source.tmp" -mv "$source.tmp" "$source" +if [ -e "$source.tmp" ]; +then + mv "$source.tmp" "$source" +fi diff --git a/src/_adr_remove_status b/src/_adr_remove_status index 497051e..dd97756 100755 --- a/src/_adr_remove_status +++ b/src/_adr_remove_status @@ -29,4 +29,7 @@ awk -v current_status="$current_status" ' { print } ' "$file" > "$file.tmp" -mv "$file.tmp" "$file" +if [ -e "$file.tmp" ]; +then + mv "$file.tmp" "$file" +fi