Commit c45bf9c4 authored by Mattia Rizzolo's avatar Mattia Rizzolo

udd-query: remove the temporary file with a trap

in case this script is called with the wrong argument, and in case of
failures, etc, the temporary file would be left around otherwise
Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 8bb1c48d
......@@ -62,7 +62,6 @@ multiarch_versionskew() {
# TODO: show versions (per arch) too
done
fi
rm $UDD
}
orphaned_without_o_bug() {
......@@ -95,13 +94,15 @@ orphaned_without_o_bug() {
done
fi
rm -f "$UDD" "$WNPPRM" "$SORTED_UDD"
rm -f "$WNPPRM" "$SORTED_UDD"
}
#
# main
#
UDD=$(mktemp)
function rmtmpfile { rm -f "$UDD"; }
trap rmtmpfile exit
case $1 in
orphaned_without_o_bug)
orphaned_without_o_bug
......
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