summaryrefslogtreecommitdiffstats
path: root/skripti/sponge_only_on_success.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-09-20 18:05:03 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-09-20 18:05:03 +0200
commit5c2581ce27dc81955759232d459bcbe114782ed0 (patch)
tree8c30d8ae76bb520c169bf536f2ae62899f796dfe /skripti/sponge_only_on_success.sh
parentsponge_only_on_success.sh (diff)
downloadr-5c2581ce27dc81955759232d459bcbe114782ed0.tar
r-5c2581ce27dc81955759232d459bcbe114782ed0.tar.gz
r-5c2581ce27dc81955759232d459bcbe114782ed0.tar.bz2
r-5c2581ce27dc81955759232d459bcbe114782ed0.tar.lz
r-5c2581ce27dc81955759232d459bcbe114782ed0.tar.xz
r-5c2581ce27dc81955759232d459bcbe114782ed0.tar.zst
r-5c2581ce27dc81955759232d459bcbe114782ed0.zip
Diffstat (limited to '')
-rwxr-xr-xskripti/sponge_only_on_success.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/skripti/sponge_only_on_success.sh b/skripti/sponge_only_on_success.sh
index 6f6f65b..8b3ed30 100755
--- a/skripti/sponge_only_on_success.sh
+++ b/skripti/sponge_only_on_success.sh
@@ -1,6 +1,7 @@
#!/bin/bash
p=`rev <<<$0 | cut -d/ -f1 | rev`
t=`mktemp -p "" $p.XXX`
+trap "rm $t" EXIT
o=$1
shift
$@ > $t