mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +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:
parent
e2e48d9e84
commit
588dfe6c00
1 changed files with 2 additions and 17 deletions
|
@ -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
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue