urbit/sh/release-king-linux64-static
Jared Tobin 4c6b665e94
sh: ensure release dir exists in static king build
Fixes a minor bug that can occur when copying the resulting binary.

(Also removes the use of ldd, which doesn't apply in the static binary
case.)
2020-02-20 19:55:49 +04:00

27 lines
349 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
if [ -n "${TRAVIS_TAG-}" ]
then
ver="$TRAVIS_TAG"
elif [ -n "${TRAVIS_COMMIT-}" ]
then
ver="$TRAVIS_COMMIT"
else
ver="$(git rev-parse HEAD)"
fi
pushd pkg/hs
king=$(bash $(nix-build --no-link -A fullBuildScript))
popd
mkdir -p release
out="release/king-linux64-static-$ver"
cp "$king"/bin/urbit-king "$out"