From f0443679ae1a19659cea3e6765395328cb08da0a Mon Sep 17 00:00:00 2001 From: mobinmob Date: Fri, 23 Aug 2024 13:28:27 +0300 Subject: apkg-reposync: clean the temporary file. --- apkg-reposync | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apkg-reposync') diff --git a/apkg-reposync b/apkg-reposync index 11b542d..3507486 100755 --- a/apkg-reposync +++ b/apkg-reposync @@ -5,6 +5,7 @@ temp_repos_file=$(mktemp) die() { [ "$1" ] && echo "error: $1" + rm -f "$temp_repos_file" exit 1 } @@ -60,4 +61,4 @@ sync_or_skip() { source_and_sanity_checks sync_official sync_or_skip -if sync_or_skip; then echo "[~> Repo(s) succesfully synced!]"; fi +if sync_or_skip; then echo "[~> Repo(s) succesfully synced!]" && rm -f "temp_repos_file"; fi -- cgit v1.2.3