2019-10-24 04:59:03 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
# Usage: create-ropsten-pills
|
2019-10-24 04:59:03 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
# Build the ivory and brass ropsten pills, copying them to the local directory,
|
|
|
|
# named with the current give revision
|
2019-10-24 04:59:03 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
set -xeuo pipefail
|
2019-10-24 04:59:03 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
cd "${0%/*}/.."
|
|
|
|
|
|
|
|
rev="$(git rev-parse HEAD)"
|
|
|
|
sha="${rev:0:5}"
|
|
|
|
|
|
|
|
brass="brass-ropsten-${sha}.pill"
|
|
|
|
ivory="ivory-ropsten-${sha}.pill"
|
|
|
|
|
|
|
|
cp -f "$(nix-build -A brass-ropsten.build --no-out-link)" "$brass"
|
|
|
|
cp -f "$(nix-build -A ivory-ropsten.build --no-out-link)" "$ivory"
|
|
|
|
|
|
|
|
chmod 0644 "$brass" "$ivory"
|