mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Windows build: Clean up after abnormal exits
This commit is contained in:
parent
e71f69ec72
commit
1dc3c4bde9
1 changed files with 2 additions and 3 deletions
|
@ -22,6 +22,8 @@ try cd "${workdir}"
|
|||
OUTPUT=${workdir}/etherpad-win.zip
|
||||
|
||||
TMP_FOLDER=$(try mktemp -d) || exit 1
|
||||
trap 'exit 1' HUP INT TERM
|
||||
trap 'log "cleaning up..."; try cd / && try rm -rf "${TMP_FOLDER}"' EXIT
|
||||
|
||||
log "create a clean environment in $TMP_FOLDER..."
|
||||
try cp -ar . "$TMP_FOLDER"
|
||||
|
@ -58,7 +60,4 @@ log "create the zip..."
|
|||
try cd "$TMP_FOLDER"
|
||||
try zip -9 -r "${OUTPUT}" ./* -x var
|
||||
|
||||
log "clean up..."
|
||||
try rm -rf "$TMP_FOLDER"
|
||||
|
||||
log "Finished. You can find the zip at ${OUTPUT}"
|
||||
|
|
Loading…
Reference in a new issue