mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
29 lines
428 B
Plaintext
29 lines
428 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
err () { echo "$@" >&2; exit 1; }
|
||
|
|
||
|
[ $# = 2 ] || {
|
||
|
sh/cross urbit linux64
|
||
|
sh/cross urbit darwin
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
traced () {
|
||
|
echo '$' "$@" >&2; "$@"
|
||
|
}
|
||
|
|
||
|
release () {
|
||
|
traced nix-build nix/release.nix --no-out-link -A "$1"
|
||
|
}
|
||
|
|
||
|
pkg="$1"
|
||
|
env="$2"
|
||
|
|
||
|
res=$(release "$env.$pkg")
|
||
|
|
||
|
mkdir -p ./cross/$env
|
||
|
traced cp -f $res/bin/$pkg ./cross/$env/$pkg
|
||
|
traced cp -f $res/bin/$pkg-worker ./cross/$env/$pkg-worker
|