aboutsummaryrefslogtreecommitdiff
path: root/bin/igex
blob: 1ca23ecfa0d1780c2f46b17ad96d98434361e1eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Run a command and ignore specified exit values.
igs=$1,
shift
"$@"
ex=$?
while [ -n "$igs" ] ; do
    ig=${igs%%,*}
    [ "$((ig == ex))" -eq 1 ] && exit 0
    igs=${igs#*,}
done
exit "$ex"