aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormobinmob <mobinmob@disroot.org>2024-08-23 13:28:27 +0300
committermobinmob <mobinmob@disroot.org>2024-08-23 13:28:27 +0300
commitf0443679ae1a19659cea3e6765395328cb08da0a (patch)
tree700ba2fe8b671bb9f8aff98206e92cbff526e450
parent867485686365c745984778cc7404b8e955e2cea2 (diff)
downloadautils-f0443679ae1a19659cea3e6765395328cb08da0a.tar.gz
autils-f0443679ae1a19659cea3e6765395328cb08da0a.zip
apkg-reposync: clean the temporary file.
-rwxr-xr-xapkg-reposync3
1 files changed, 2 insertions, 1 deletions
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