File: run.sh

package info (click to toggle)
skiboot 5.3.3-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 13,280 kB
  • ctags: 13,840
  • sloc: ansic: 77,199; asm: 1,002; sh: 997; cpp: 894; tcl: 408; makefile: 325; python: 166; pascal: 65
file content (16 lines) | stat: -rwxr-xr-x 162 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

t=$(mktemp) || exit 1

trap "rm -f -- '$t'" EXIT

$* 2>&1 > $t
r=$?
if [ $r != 0 ]; then
    cat $t
    exit $r
fi

rm -f -- "$t"
trap - EXIT
exit 0