Skip to content

Commit c738121

Browse files
committed
Fix typo
1 parent 16aaa62 commit c738121

File tree

3 files changed

+20
-23
lines changed

3 files changed

+20
-23
lines changed

plugins/envsetup

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# SOFTWARE.
2525

2626
export 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
4242
if [ "$(uname -o)" = "Android" ]; then
43-
export FS_COOK_PLATFORM="termux"
43+
export BUILD_PLATFORM="termux"
4444
fi
4545

4646
# sudo check
4747
if [ "$(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

112112
do_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

242242
includes_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

473471
do_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

606604
banner
607605

608-
if [ "$FS_COOK_PLATFORM" == "termux" ]; then
606+
if [ "$BUILD_PLATFORM" == "termux" ]; then
609607
lshout "Running on termux"
610-
BUILD_PALTFORM="termux"
611608
fi
612609

plugins/setup-user.sh

100644100755
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash
22

3-
# username = FS_USER
4-
# password = FS_PASS
3+
# FS_USER = username
4+
# FS_PASS = password
55

66
useradd -m \
7-
-p "$(openssl passwd -1 FS_PASS)" \
7+
-p "$(openssl passwd -1 $FS_PASS)" \
88
-G sudo \
9-
-d /home/FS_USER \
9+
-d /home/$FS_USER \
1010
-k /etc/skel \
1111
-s /bin/bash \
12-
FS_USER
13-
echo FS_USER ALL=\(root\) ALL > /etc/sudoers.d/FS_USER
14-
chmod 0440 /etc/sudoers.d/FS_USER
12+
$FS_USER
13+
echo $FS_USER ALL=\(root\) ALL > /etc/sudoers.d/$FS_USER
14+
chmod 0440 /etc/sudoers.d/$FS_USER

plugins/zst-packer.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)