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
+16 -13
View File
@@ -1,24 +1,27 @@
#!/bin/sh
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
pkgname=uClibc-ng
pkgver=1.0.50
#------------ glibc ----------------------------------------
uclibc() {
printf "$UGREEN** Building uclibc\n$RESET"
mkdir -p $build/uclibc # &>> $fulllogfile
cd $build/uclibc
tar -xvf $root/downloads/uClibc-ng-1.0.50.tar.xz # &>> $fulllogfile
check $? "Extract uclibc"
cd uClibc-ng-1.0.50
cp -rv $root/uclibc/config-1.0.50 .config
printf "$UGREEN** Building ${pkgname}\n$RESET"
mkdir -p $build/${pkgname} # &>> $fulllogfile
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz # &>> $fulllogfile
check $? "Extract ${pkgname}"
cd ${pkgname}-${pkgver}
cp -rv $root/uclibc/config-${pkgver} .config
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig
check $? "Configure uclibc"
check $? "Configure ${pkgname}"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile
check $? "Build uclibc"
check $? "Build ${pkgname}"
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- DESTDIR=$rootfspath install # &>> $fulllogfile
check $? "Install uclibc to rootfs"
check $? "Install ${pkgname} to rootfs"
cd $rootfspath
find -name \*.a -delete # &>> $fulllogfile
find -name \*.o -delete
@@ -26,6 +29,6 @@ uclibc() {
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/* $rootfspath/usr/bin/* # &>> $fulllogfile $rootfspath/usr/lib/*
rm -rv $rootfspath/usr/include
cd $root
check $? "Build and install uclibc"
check $? "Build and install ${pkgname}"
}
#-----------------------------------------------------------
#-----------------------------------------------------------