Use a function for cleanup at exit

This commit is contained in:
root 2012-12-13 21:02:14 +04:00
parent d85190ef51
commit fc191d5b3c

View file

@ -761,12 +761,17 @@ EOF
echo_git
}
cleanup_atexit()
{
rm -f "$Localdir"/tmp_*".$$" >&2
}
NAME=$1 # Remote name
URL=$2 # Remote URL
mkdir -p "$Localdir"
trap cleanup_atexit EXIT 1 2 3 15
trap 'rm -f "$Localdir/tmp_"*".$$"' EXIT 1 2 3 15
echo_info "Development version -- Repository format MAY CHANGE"
while read Input