19 lines
294 B
Bash
Executable File
19 lines
294 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
while str isvalue "$1"; do
|
|
|
|
pig_fetch "$1" | xq -x "$(
|
|
printf '.
|
|
* { feed: { pig: {
|
|
feed_url: "%b",
|
|
pet_sound: "oink",
|
|
stow_date: "%b",
|
|
version: "0"
|
|
} } }' "$1" "$(date '+%Y-%m-%dT%T')"\
|
|
| tr -d '[:space:]' \
|
|
)" >"$(pig_pen)/$(pig_name "$1")"
|
|
|
|
shift
|
|
done
|