Forgot to add the cleanup function
This commit is contained in:
parent
e9f7dab5e6
commit
aa9d02670b
@ -65,6 +65,12 @@ has() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# Helper functions
|
||||
cleanup() {
|
||||
[ -z "$1" ] && warn "No argument passed to cleanup"
|
||||
rm -rf "$1" || warn "Failed to remove $1: $?"
|
||||
}
|
||||
|
||||
# Core program functions
|
||||
printhelp() {
|
||||
cat << EOF
|
||||
@ -167,7 +173,7 @@ main() {
|
||||
# TODO: That
|
||||
# Validate core program dependencies
|
||||
log "Validating dependencies" 2
|
||||
if ! has basename curl tar; then
|
||||
if ! has basename curl systemd-nspawn tar; then
|
||||
error "Failed to find program: $_return" 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user