Use a function for cleanup at exit
This commit is contained in:
parent
d85190ef51
commit
fc191d5b3c
1 changed files with 6 additions and 1 deletions
|
@ -761,12 +761,17 @@ EOF
|
||||||
echo_git
|
echo_git
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup_atexit()
|
||||||
|
{
|
||||||
|
rm -f "$Localdir"/tmp_*".$$" >&2
|
||||||
|
}
|
||||||
|
|
||||||
NAME=$1 # Remote name
|
NAME=$1 # Remote name
|
||||||
URL=$2 # Remote URL
|
URL=$2 # Remote URL
|
||||||
|
|
||||||
mkdir -p "$Localdir"
|
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"
|
echo_info "Development version -- Repository format MAY CHANGE"
|
||||||
|
|
||||||
while read Input
|
while read Input
|
||||||
|
|
Loading…
Reference in a new issue