0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 21:30:16 +02:00

Removing cleanup logic. rm -rf in a script terrifies me. The script attempts to place it into the temp dir, so we will let the OS clean it up.

This commit is contained in:
Micheal Quinn 2019-08-12 14:40:46 -05:00
parent e2e48d9e84
commit 588dfe6c00
No known key found for this signature in database
GPG key ID: 0E7217F3C30BA059

View file

@ -389,21 +389,6 @@ install_file_linux() {
return "${rcode}"
}
#--- FUNCTION ----------------------------------------------------------------
# NAME: cleanup
# DESCRIPTION: Cleanup our temp files
# PARAMETERS: $1 = Path to temp dir to remove
# RETURNS: nothing
#-------------------------------------------------------------------------------
cleanup() {
local dir
dir="$1"
rm -rf "${dir}"
}
#--- FUNCTION ----------------------------------------------------------------
# NAME: main
# DESCRIPTION: Put it all together in a logical way
@ -579,9 +564,9 @@ main() {
exit 1
fi
print_message "== Cleaning up ${tmpdir}" "info"
cleanup "${tmpdir}"
print_message "== Installation complete" "ok"
exit 0
}
#-------------------------------------------------------------------------------