mirror of
https://github.com/iHaiDeeZ/OpenCE-PS4.git
synced 2026-10-26 19:01:53 +01:00
11 lines
353 B
Bash
11 lines
353 B
Bash
#!/usr/bin/env bash
|
|
# logrun.sh <log name> <command...>: run a command with its output in ~/opence-build/logs/<name>.log
|
|
# and its exit status appended as the last line (for long runs started from Windows).
|
|
name="$1"; shift
|
|
log="$HOME/opence-build/logs/$name.log"
|
|
mkdir -p "$(dirname "$log")"
|
|
"$@" > "$log" 2>&1
|
|
rc=$?
|
|
echo "exit=$rc" >> "$log"
|
|
exit $rc
|