2424# SOFTWARE.
2525
2626export ROOT_DIR
27- export BUILD_PALTFORM =" linux"
27+ export BUILD_PLATFORM =" linux"
2828
2929_c_magneta=" \e[95m"
3030_c_green=" \e[32m"
@@ -40,12 +40,12 @@ msg() { echo -e "${*} \e[0m" >&2;:;}
4040
4141# Check if environment is Termux
4242if [ " $( uname -o) " = " Android" ]; then
43- export FS_COOK_PLATFORM =" termux"
43+ export BUILD_PLATFORM =" termux"
4444fi
4545
4646# sudo check
4747if [ " $( id -u) " != " 0" ]; then
48- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
48+ if [ " $BUILD_PLATFORM " == " termux" ]; then
4949 SUDO=" "
5050 else
5151 if command -v sudo & > /dev/null; then
@@ -111,7 +111,7 @@ do_mount() {
111111
112112do_unmount ()
113113{
114- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
114+ if [ " $BUILD_PLATFORM " == " termux" ]; then
115115 lshout " Skip unmount for termux"
116116 else
117117 local chroot_dir=$1
@@ -241,7 +241,7 @@ foreign_arch() {
241241
242242includes_packages () {
243243 # comma sperated values
244- includes=" bzip2 pv ${INCLUDE_PACKAGES} "
244+ includes=" bzip2 pv openssl zstd ${INCLUDE_PACKAGES} "
245245 # environment variable INCLUDE_PACKAGES
246246 export includes
247247 x=0
@@ -266,7 +266,7 @@ do_build() {
266266 foreign_arch " $arch "
267267
268268 # Disable cross architecture building in Termux
269- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
269+ if [ " $BUILD_PLATFORM " == " termux" ]; then
270270 case $worker_arch in
271271 aarch64) termux_arch=" arm64" ;;
272272 arm* ) termux_arch=" armhf" ;;
@@ -322,11 +322,10 @@ do_build() {
322322 _debootstrap=$( which debootstrap)
323323 fi
324324
325- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
325+ if [ " $BUILD_PLATFORM " == " termux" ]; then
326326 dpkg_depends_on debootstrap
327327 _debootstrap=" $( which debootstrap) "
328328 FOREIGN=" "
329- ENABLE_USER_SETUP=false
330329 fi
331330
332331 (
@@ -340,7 +339,7 @@ do_build() {
340339 $MIRROR
341340 ) || die " Couldn't debootstrap..."
342341
343- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
342+ if [ " $BUILD_PLATFORM " == " termux" ]; then
344343 lshout " Skipping second stage for termux"
345344 arch_translate " $arch "
346345 else
@@ -411,7 +410,6 @@ setup_user() {
411410 cp plugins/setup-user.sh $chroot_dir
412411 sed -i " s/FS_USER/$FS_USER /g" $chroot_dir /setup-user.sh
413412 sed -i " s/FS_PASS/$FS_PASS /g" $chroot_dir /setup-user.sh
414- install_pkg " openssl"
415413 run_cmd " chmod +x /setup-user.sh"
416414 run_cmd " /bin/bash /setup-user.sh"
417415 run_cmd " rm -rf /setup-user.sh"
@@ -471,7 +469,7 @@ do_chroot_root_ae() {
471469}
472470
473471do_chroot_ae () {
474- if [ $BUILD_PALTFORM == " termux" ]; then
472+ if [ $BUILD_PLATFORM == " termux" ]; then
475473 do_chroot_proot_ae " $@ "
476474 else
477475 do_chroot_root_ae " $@ "
@@ -484,7 +482,7 @@ do_compress() {
484482 export chroot_dir=$1
485483 TARGET_FILE=" $( basename ${chroot_dir} ) "
486484
487- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
485+ if [ " $BUILD_PLATFORM " == " termux" ]; then
488486 if [ ! -d " $chroot_dir " ]; then
489487 lshout " Skip compressing $chroot_dir "
490488 return 0
@@ -499,7 +497,7 @@ do_compress() {
499497 zstd) do_tar_zstd ;;
500498 * )
501499 shout " Unknown compression type"
502- shout " all compression: lz,gzip,bzip2"
500+ shout " all compression: lz,gzip,bzip2,zstd "
503501 die " Giving up!!"
504502 ;;
505503 esac
@@ -605,8 +603,7 @@ install_pkg()
605603
606604banner
607605
608- if [ " $FS_COOK_PLATFORM " == " termux" ]; then
606+ if [ " $BUILD_PLATFORM " == " termux" ]; then
609607 lshout " Running on termux"
610- BUILD_PALTFORM=" termux"
611608fi
612609
0 commit comments