Skip to content

Commit

Permalink
Improve build script
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Sep 27, 2022
1 parent 3d33349 commit 9db16a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash
# This script creates a mold binary distribution. The output is
# written in this directory as `mold-$version-$arch-linux.tar.gz`
# (e.g. `mold-1.0.3-x86_64-linux.tar.gz`).
Expand All @@ -7,8 +7,6 @@
# libstdc++ and libcrypto but dynamically-linked to libc, libm, libz
# and librt, as they almost always exist on any Linux systems.

set -e

if [ $# -ne 1 ]; then
echo "Usage: $0 [ x86_64 | aarch64 ]"
exit 1
Expand All @@ -23,6 +21,8 @@ fi
version=$(grep '^VERSION =' $(dirname $0)/Makefile | sed 's/.* = //')
dest=mold-$version-$arch-linux

set -e -x

docker run --platform linux/$arch -it --rm -v "$(pwd):/mold" \
-e "OWNER=$(id -u):$(id -g)" rui314/mold-builder:latest \
bash -c "mkdir /tmp/build &&
Expand Down

0 comments on commit 9db16a8

Please sign in to comment.