OILS / deps / source.medo / bash / WEDGE View on Github | oilshell.org

48 lines, 35 significant
1# Wedge definition for bash
2#
3# Loaded by deps/wedge.sh.
4
5set -o nounset
6set -o pipefail
7set -o errexit
8
9# sourced
10WEDGE_NAME='bash'
11
12# Validate requested version against this list
13# The global variable WEDGE_VERSION gets SET after validation.
14WEDGE_VERSION_LIST='4.4 5.2 5.2.21'
15
16wedge-make() {
17 local src_dir=$1
18 local build_dir=$2
19 local install_dir=$3
20
21 # --without-bash-malloc for Alpine only -- musl libc incompatibility?
22 # https://patchwork.ozlabs.org/project/buildroot/patch/20170523171931.18744-1-dsabogalcc@gmail.com/
23 time $src_dir/configure --without-bash-malloc --prefix=$install_dir
24
25 time make
26}
27
28wedge-install() {
29 local build_dir=$1
30
31 pushd $build_dir
32
33 time make install
34
35 popd
36}
37
38wedge-smoke-test() {
39 local install_dir=$1
40
41 $install_dir/bin/bash -c 'echo "hi from bash"'
42 $install_dir/bin/bash --version
43
44 # Create bash-4.4 and bash-5.2 symlinks for use in spec tests
45 pushd $install_dir/bin
46 ln -s -v bash bash-$WEDGE_VERSION
47 popd
48}