Commit c7d9fdb6 authored by Diego Pasqualin's avatar Diego Pasqualin
Browse files

update_mirror.sh: Add trap to clean temp files before exit


Signed-off-by: default avatarDiego Pasqualin <dpasqualin@c3sl.ufpr.br>
parent 70419eaf
......@@ -29,6 +29,13 @@ TMPDIR=$(mktemp -d --tmpdir=/tmp)
PUBLISHSCRIPT="$(dirname $0)/le-publica.sh"
HOST="http://windu.c3sl.ufpr.br/le5"
function clean() {
rm -rf $TMPDIR
exit 0
}
trap "clean" SIGINT SIGTERM
function buildURL() {
local status="$1"
echo "http://windu.c3sl.ufpr.br/le5/dists/le5-$status/main/binary-i386/Packages"
......@@ -141,4 +148,5 @@ for pkgVersionFrom in $fromPkgAndVersion; do
fi
done
rm -rf $TMPDIR
# Clean temp files before exit
clean
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment