urbit/sh/cachix

27 lines
537 B
Plaintext
Raw Normal View History

2019-03-05 03:43:53 +03:00
#!/usr/bin/env bash
fail () {
echo "$@"
exit 1
}
2019-04-26 03:05:16 +03:00
if [ -z "$CACHIX_SIGNING_KEY" ]
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
fi
2019-03-05 03:43:53 +03:00
if [ -z "$CACHIX_AUTH_TOKEN" ]
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
fi
cleanup () {
rm -f .cache.list
}
trap cleanup EXIT
cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
2019-04-26 03:05:16 +03:00
cachix use urbit2
2019-04-26 03:10:22 +03:00
nix-build --no-out-link nix/dep-repos.nix > .cache.list
nix-build --no-out-link default.nix >> .cache.list
2019-04-26 03:05:16 +03:00
cachix push urbit2 < .cache.list