Skip to content

Instantly share code, notes, and snippets.

@h0tw1r3
Created August 20, 2024 17:56
ifeq (${MAKELEVEL},0)
export SCRATCH := $(shell mktemp -d ./.tmp_XXXXXXXX)
$(info Launching clean up task for ${SCRATCH})
$(shell bash -c "set -m ; trap 'rm -rvf ${SCRATCH};' EXIT; lsof -p $$PPID +r 1;" </dev/null >/dev/null 2>/dev/null & disown)
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment