diff options
| author | EuAndreh <eu@euandre.org> | 2023-02-23 06:51:54 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2023-02-23 07:17:52 -0300 |
| commit | 562bda6e8bb2135792fe96795995e8f8c056dae3 (patch) | |
| tree | 79a665c32c54b14e7d5e52d588f2ad57fe96d23d /bin/cl | |
| parent | bin/cl: Use uuid(1), tmpname(1) and mkstemp(1) from $PATH (diff) | |
| download | dotfiles-562bda6e8bb2135792fe96795995e8f8c056dae3.tar.gz dotfiles-562bda6e8bb2135792fe96795995e8f8c056dae3.tar.xz | |
bin/: Cleanup temp file before exit
Diffstat (limited to '')
| -rwxr-xr-x | bin/cl | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -118,8 +118,10 @@ for flag in "$@"; do esac done -NO_RC=false SCRIPT="$(mkstemp)" +trap 'rm -f "$SCRIPT"' EXIT + +NO_RC=false LISP_CLI_RC="${XDG_CONFIG_HOME:-$HOME/.config}/lisp-cli/init.lisp" VERBOSE=false IMAGE='' @@ -188,6 +190,7 @@ if [ "$PRESERVE_ARGS" = false ]; then fi MAIN="$(mkstemp)" +trap 'rm -f "$MAIN"' EXIT if [ "$NO_RC" = false ] && [ -e "$LISP_CLI_RC" ]; then escape_name "$LISP_CLI_RC" > "$MAIN" fi @@ -245,7 +248,7 @@ case "$IMPL" in else set -x fi - exec clisp "$@" + clisp "$@" ;; clozure) set -- -l "$MAIN" "$@" @@ -260,7 +263,7 @@ case "$IMPL" in else set -x fi - exec ccl "$@" + ccl "$@" ;; cmucl) exit 4 @@ -289,7 +292,7 @@ case "$IMPL" in else set -x fi - exec sbcl "$@" + sbcl "$@" ;; *) printf 'Unsupported implementation: "%s".\n\n' "$IMPL" >&2 |
