dhall-kubernetes/scripts/generate.sh
Gabriel Gonzalez 1c6397ccde
Improve coverage for ./scripts/generate.sh (#100)
`./scripts/generate.sh` will now also auto-update the
`./examples/*.dhall` files and `./package.dhall`, too
2020-01-07 18:29:56 -08:00

17 lines
569 B
Bash
Executable File

#!/bin/sh
if dir=$(nix-build release.nix --attr dhall-kubernetes --no-out-link); then
rm -rf ./defaults ./types
cp -r "$dir"/defaults .
chmod u+w ./defaults
cp -r "$dir"/types .
chmod u+w ./types
cp -r "$dir"/schemas .
chmod u+w ./schemas
cp -r "$dir"/examples .
chmod u+w ./examples
cp "$dir"/types.dhall "$dir"/typesUnion.dhall "$dir"/defaults.dhall "$dir"/schemas.dhall "$dir"/package.dhall .
chmod u+w ./types.dhall ./typesUnion.dhall ./defaults.dhall ./schemas.dhall ./package.dhall
cp "$dir/README.md" README.md
chmod u+w ./README.md
fi