improve dummy check and in scripts
This commit is contained in:
parent
e45133a155
commit
c78384f93b
2 changed files with 35 additions and 3 deletions
18
in
18
in
|
@ -1 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
exec 3>&1 # make stdout available as fd 3 for the result
|
||||
exec 1>&2 # redirect all output to stderr for logging
|
||||
|
||||
PAYLOAD=$(mktemp /tmp/resource-in.XXXXXX)
|
||||
|
||||
cat > "$PAYLOAD" <&0
|
||||
|
||||
TS=$(jq '.version.timestamp // empty' < "$PAYLOAD")
|
||||
[ -z "$TS" ] && TS='"none"'
|
||||
|
||||
jq -n "{
|
||||
version: {
|
||||
timestamp: $TS
|
||||
}
|
||||
}" >&3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue