mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
24 lines
616 B
Bash
Executable File
24 lines
616 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
bash_repo="${bash_repo:-https://git.savannah.gnu.org/git/bash.git}"
|
|
bash_tag="${bash_tag:-bash-5.3}"
|
|
stdlib="${stdlib:-musl}"
|
|
|
|
pushd "build" &>/dev/null || exit 1
|
|
|
|
if [ ! -d "bash" ]; then
|
|
git clone --depth 1 --branch "$bash_tag" "$bash_repo" "bash"
|
|
else
|
|
pushd "bash" &>/dev/null || exit 1
|
|
git pull
|
|
popd &>/dev/null || exit 1
|
|
fi
|
|
|
|
pushd "bash" &>/dev/null || exit 1
|
|
./configure --without-bash-malloc --enable-static-link --host="aarch64-linux-$stdlib" CC="aarch64-linux-$stdlib-gcc"
|
|
make
|
|
mv bash ../bin/bash
|
|
popd &>/dev/null || exit 1
|
|
|
|
popd &>/dev/null || exit 1 |