21 lines
No EOL
586 B
Bash
Executable file
21 lines
No EOL
586 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Simple unified job that handles both config and exec via subcommands
|
|
|
|
case "${1:-}" in
|
|
"config")
|
|
# Configuration mode - output job config JSON
|
|
partition_ref="${2:-}"
|
|
echo "[{\"outputs\":[\"${partition_ref}\"],\"inputs\":[],\"args\":[\"will\", \"build\", \"${partition_ref}\"],\"env\":{\"foo\":\"bar\"}}]"
|
|
;;
|
|
"exec")
|
|
# Execution mode - run the job
|
|
echo 'EXECUTE UNIFIED!'
|
|
echo "foo=$foo"
|
|
echo "args=$@"
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {config|exec} [args...]"
|
|
exit 1
|
|
;;
|
|
esac |