35 lines
956 B
Bash
35 lines
956 B
Bash
#!/bin/bash
|
|
|
|
. ./scripts/colors.sh
|
|
. ./scripts/funcs.sh
|
|
. ./scripts/config.sh
|
|
|
|
bash() {
|
|
pkgname=bash
|
|
pkgver=5.2.32
|
|
srcurl=https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz
|
|
print_info "** Building and installing bash"
|
|
mkdir -p $build/${pkgname}
|
|
cd $build/${pkgname}
|
|
if [ ! -f $root/downloads/${pkgname}-${pkgver}.tar.gz ]; then
|
|
print_info "** Downloading $srcurl"
|
|
cd $root/downloads
|
|
wget $srcurl
|
|
check $? "download $srcurl"
|
|
cd -
|
|
fi
|
|
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.gz
|
|
check $? "Extract ${pkgname}"
|
|
cd ${pkgname}-${pkgver}
|
|
./configure \
|
|
--prefix=/usr \
|
|
--disable-readline \
|
|
--host=$CROSS_COMPILE
|
|
check $? "Configure bash"
|
|
make $makeflags
|
|
check $? "Build bash"
|
|
cp -v bash $rootfspath/usr/bin
|
|
$CROSS_COMPILE-strip --strip-unneeded $rootfspath/usr/bin/bash
|
|
check $? "Installing to rootfs bash"
|
|
}
|