added #!/bin/bash instead #!/bin/sh

This commit is contained in:
wt
2025-03-01 22:07:33 +07:00
parent 91b7d9341d
commit dd41d6fe02
21 changed files with 91 additions and 76 deletions
+14 -11
View File
@@ -1,22 +1,25 @@
#!/bin/sh
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
pkgname=zlib
pkgver=1.3.1
zlib() {
printf "$GREEN** Building and installing zlib\n$RESET"
mkdir $build/zlib
cd $build/zlib
tar -xvf $root/downloads/zlib-1.3.1.tar.gz
check $? "Extract zlib"
cd zlib-1.3.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.gz
check $? "Extract ${pkgname}"
cd ${pkgname}-${pkgver}
CC=${CROSS_COMPILE}-gcc ./configure --prefix=/usr --shared
check $? "Configure zlib"
check $? "Configure ${pkgname}"
make $makeflags
check $? "Build zlib"
check $? "Build ${pkgname}"
make DESTDIR=$rootfspath install
rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.1.3.1
check $? "Installing to rootfs zlib"
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.${pkgver}
check $? "Installing to rootfs ${pkgname}"
}