Skip to content

Commit

Permalink
commit 769150673 on 20201117
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRausty committed Nov 18, 2020
1 parent 4f243b1 commit 009b624
Show file tree
Hide file tree
Showing 14 changed files with 455 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .conf/VERSIONID
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.368
2.0.369
374 changes: 212 additions & 162 deletions archlinuxconfig.bash

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions espritfunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
# https://sdrausty.github.io/TermuxArch/README has info about this project.
# https://sdrausty.github.io/TermuxArch/CONTRIBUTORS Thank you for your help.
################################################################################
_ANDROIDCOUNTRYCODES_() {
ANDROIDCOUNTRYCODES=(ac ad ae af ag ai al am an ao aq ar as at au aw ax az ba bb bd be bf bg bh bi bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv cx cy cz de dj dk dm do dz ec ee eg eh er es et fi fj fk fm fo fr fx ga gb gd ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc li lk lr ls lt lu lv ly ma mc md me mf mg mh mk ml mm mn mo mp mq mr ms mt mu mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk sl sm sn so sr st sv sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz ua ug um us uy uz va vc ve vg vi vn vu wf ws xk ye yt yu za zm zw)
USERCOUNTRYCODE="$(getprop gsm.operator.iso-country || getprop gsm.sim.operator.iso-country)"
printf "%s\\n" "Looking for Android country code match; Please wait a moment"
for ANDROIDCOUNTRYCODE in ${ANDROIDCOUNTRYCODES[@]}
do
if grep $USERCOUNTRYCODE <<< $ANDROIDCOUNTRYCODE 1>/dev/null
then
printf "%s\\n" "Found Android country code match $USERCOUNTRYCODE."
fi
done
printf "%s\\n" "Looking for Android country code match; DONE; Continuing..."
}

_BLOOM_() { # Bloom = `setupTermuxArch manual verbose`
[[ -d "$HOME"/TermuxArchBloom ]] && _RMBLOOMQ_
mkdir -p "$HOME"/TermuxArchBloom
Expand Down Expand Up @@ -193,11 +207,9 @@ SPINDLAY="0.$(shuf -i 1-4 -n 1)"
printf "\\e[?25l"
while :
do
printf " \b\b\b%s\b" "${SPINNERL:INCREMNT++%${#SPINNERL}:1}"
printf " \\b\\b\\b%s\\b" "${SPINNERL:INCREMNT++%${#SPINNERL}:1}"
sleep $SPINDLAY
done
printf "\\n\\e[?25h"
disown
}

_TAMATRIX_() { # print TermuxArch source code as matrix
Expand Down
2 changes: 1 addition & 1 deletion getimagefunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ wget "$DMVERBOSE" -c --show-progress "$NLCMIRROR/$RPATH/$IFILE".md5 "$NLCMIRROR/
else
curl -v "$CMIRROR" &> "$TAMPDIR/global2localmirror"
NLCMIRROR="$(grep Location "$TAMPDIR/global2localmirror" | awk {'print $3'})"
NLCMIRROR="${NLCMIRROR%$'\r'}" # remove trailing carrage return. Search string: strip bash variable non printing characters
NLCMIRROR="${NLCMIRROR%$'\r'}" # remove trailing carrage return: strip bash variable of non printing characters
_PRINTDONE_
_PRINTDOWNLOADINGFTCH_
curl "$DMVERBOSE" -C - --fail --retry 4 -OL {"$NLCMIRROR/$RPATH/$IFILE.md5,$NLCMIRROR/$RPATH/$IFILE"}
Expand Down
14 changes: 7 additions & 7 deletions knownconfigurations.bash
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if [[ "$KOE" = 0 ]]
then
PROOTSTMNT+="--kill-on-exit "
fi
PROOTSTMNT+="--link2symlink -i \"\$AR2AR:wheel\" -0 -r $INSTALLDIR "
PROOTSTMNT+="--link2symlink -i \"\$2:wheel\" -0 -r $INSTALLDIR "
# file var/binds/fbindexample.prs has a few more examples
if [[ -n "$(ls -A "$INSTALLDIR"/var/binds/*.prs)" ]]
then
Expand Down Expand Up @@ -137,12 +137,12 @@ then # add proot bind
PROOTSTMNT+="-b ${PRSTARR[$PRBIND]}:$PRBIND "
fi
done
PROOTSTMNT+="-w /root /usr/bin/env -i HOME=/root TERM=\"$TERM\" TMPDIR=/tmp ANDROID_DATA=/data " # create PRoot user string
PROOTSTMNTUUUU="${PROOTSTMNT//HOME=\/root/HOME=\/home\/\$AR2AR}" # create PRoot user string
PROOTSTMNTUUU="${PROOTSTMNTUUUU//-0 }"
PROOTSTMNTUU="${PROOTSTMNTUUU//-w \/root/-w \/home\/\$AR2AR}" # create PRoot user string with link2symlink option enabled
PROOTSTMNTU="${PROOTSTMNTUU//--link2symlink }" # create PRoot user string with link2symlink option disabled
PROOTSTMNT="${PROOTSTMNT//-i \"\$AR2AR:wheel\" }" # create PRoot root user string
PROOTSTMNT+="-w /root /usr/bin/env -i HOME=/root TERM=\"$TERM\" TMPDIR=/tmp ANDROID_DATA=/data "
PROOTSTMNTUU="${PROOTSTMNT//HOME=\/root/HOME=\/home\/\$2}"
PROOTSTMNTUU="${PROOTSTMNTUU//-0 }"
PROOTSTMNTUU="${PROOTSTMNTUU//-w \/root/-w \/home\/\$2}" # PRoot user string with link2symlink option enabled
PROOTSTMNTU="${PROOTSTMNTUU//--link2symlink }" # PRoot user string with link2symlink option disabled
PROOTSTMNT="${PROOTSTMNT//-i \"\$2:wheel\" }" # PRoot root user string
}
_PR00TSTRING_
## uncomment the next line to test function _PR00TSTRING_
Expand Down
31 changes: 16 additions & 15 deletions maintenanceroutines.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ BKPDIR="$INSTALLDIR/var/backups/${INSTALLDIR##*/}/home/$USER"
_BKPTHF_() { # backup the user files
[[ ! -d "$BKPDIR/" ]] && mkdir -p "$BKPDIR/"
cd "$INSTALLDIR/home/$USER"
[[ -f $1 ]] && printf "\\e[1;32m==>\\e[0;32m %s" "File $1 backed up to /${INSTALLDIR##*/}/$1.$SDATE.bkp" && cp "$1" "$BKPDIR/$1.$SDATE.bkp" || _PSGI1ESTRING_ "cp '$1' if found maintenanceroutines.bash ${0##*/}"
[[ -f $1 ]] && printf "\\e[1;32m==>\\e[0;32m %s" "File '/${INSTALLDIR##*/}/home/$USER/$1' backed up to /${INSTALLDIR##*/}/var/backups/${INSTALLDIR##*/}/home/$USER/$1.$SDATE.bkp" && cp "$1" "$BKPDIR/$1.$SDATE.bkp" || _PSGI1ESTRING_ "cp '$1' if found maintenanceroutines.bash ${0##*/}"
}
if [ -d "$INSTALLDIR/home" ]
then
if [[ "$USER" != alarm ]]
then
export "$USER"
cp "$INSTALLDIR/root/bin/"* "$INSTALLDIR/home/$USER/bin/"
printf "\\n\\e[0;32mCopied files from \\e[0;32m%s to \\e[1;32m%s\\e[0;32m:\\e[0m\\n" "/${INSTALLDIR##*/}/root/bin/" "/${INSTALLDIR##*/}/home/$USER/bin/"
DOFLIST=(.bash_profile .bashrc .gitconfig .vimrc)
for DOFLNAME in "${DOFLIST[@]}"
do
Expand Down Expand Up @@ -68,7 +66,6 @@ printf "\\n"
_WAKELOCK_
_PREPINSTALLDIR_
_COPYIMAGE_
_PRINTMD5CHECK_
_MD5CHECK_
_PRINTCU_
rm -f "$INSTALLDIR"/*.tar.gz "$INSTALLDIR"/*.tar.gz.md5
Expand Down Expand Up @@ -127,12 +124,12 @@ ls "$INSTALLDIR"/root/.bashrc | cut -f7- -d /
ls "$INSTALLDIR"/root/.bash_profile | cut -f7- -d /
ls "$INSTALLDIR"/root/.vimrc | cut -f7- -d /
ls "$INSTALLDIR"/root/.gitconfig | cut -f7- -d /
ls "$INSTALLDIR"/root/bin/* | cut -f7- -d /
if [[ "${LCR:-}" = 2 ]]
then
_FUNLCR2_
fi
printf "\\n"
_COPYSTARTBIN2PATH_
_WAKEUNLOCK_
_PRINTFOOTER_
set +Eeuo pipefail
Expand Down Expand Up @@ -167,10 +164,14 @@ SPACEMESSAGE=""
elif [[ "$USRSPACE" = *M ]]
then
usspace="${USRSPACE: : -1}"
if [[ "$usspace" < "800" ]]
fi
if [[ "$usspace" < "800" ]] && [[ "$CPUABI" = "$CPUABIX86_64" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. \\e[33m$USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for x86 and x86_64 is 800M of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for x86_64 architecture is 800M of free user space.\\e[0m\\n"
fi
if [[ "$usspace" < "600" ]] && ([[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]])
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for $CPUABI architecture is 600M of free user space.\\e[0m\\n"
fi
elif [[ "$USRSPACE" = *G ]]
then
Expand All @@ -179,23 +180,23 @@ if [[ "$CPUABI" = "$CPUABI8" ]]
then
if [[ "$usspace" < "1.5" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. \\e[33m$USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for aarch64 is 1.5G of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for aarch64 architecture is 1.5G of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
elif [[ "$CPUABI" = "$CPUABI7" ]]
then
if [[ "$usspace" < "1.23" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. \\e[33m$USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for armv7 is 1.23G of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot for armv7 architecture is 1.23G of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
else
SPACEMESSAGE=""
fi
else
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. \\e[33m$USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot is more than 1.5G for aarch64, more than 1.25G for armv7 and about 800M of free user space for x86 and x86_64 architectures.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. \\e[33mThere is only $USRSPACE of free user space is available on this device. \\e[1;30mThe recommended minimum to install Arch Linux in Termux PRoot is more than 1.5G for aarch64, more than 1.25G for armv7, 800M for x86_64 and 600M of free user space for x86 architecture.\\e[0m\\n"
fi
}

Expand All @@ -205,31 +206,31 @@ if [[ "$CPUABI" = "$CPUABI8" ]]
then
if [[ "$USRSPACE" -lt "1500000" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. There is \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for aarch64 is 1.5G of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for aarch64 architecture is 1.5G of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
elif [[ "$CPUABI" = "$CPUABI7" ]]
then
if [[ "$USRSPACE" -lt "1250000" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. There is \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for armv7 is 1.25G of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for armv7 architecture is 1.25G of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
elif [[ "$CPUABI" = "$CPUABIX86_64" ]] || [[ "$CPUABI" = i386 ]]
elif [[ "$CPUABI" = "$CPUABIX86_64" ]]
then
if [[ "$USRSPACE" -lt "800000" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. There is \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for x86_64 is 800M of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for x86_64 architecture is 800M of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
elif [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "i386" ]]
then
if [[ "$USRSPACE" -lt "600000" ]]
then
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff. There is \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for $CPUABI x86 is 600M of free user space.\\e[0m\\n"
SPACEMESSAGE="\\e[0;33mTermuxArch: \\e[1;33mFREE SPACE WARNING! \\e[1;30mStart thinking about cleaning out some stuff please. There is only \\e[33m$USRSPACE $units of free user space \\e[1;30mavailable on this device. The recommended minimum to install Arch Linux in Termux PRoot for $CPUABI architecture is 600M of free user space.\\e[0m\\n"
else
SPACEMESSAGE=""
fi
Expand Down
38 changes: 19 additions & 19 deletions necessaryfunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ _ADDtrim_
_ADDv_
_ADDwe_
_ADDyt_
_DOMODdotfiles_
}

_CALLSYSTEM_() {
Expand Down Expand Up @@ -187,26 +186,23 @@ _MAKEFINISHSETUP_() {
_DOKEYS_() {
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]]
then
DOKYSKEY="/root/bin/keys x86"
DOKYSKEY="keys x86"
elif [[ "$CPUABI" = "$CPUABIX86_64" ]]
then
DOKYSKEY="/root/bin/keys x86_64"
DOKYSKEY="keys x86_64"
else
DOKYSKEY="/root/bin/keys"
DOKYSKEY="keys"
fi
}
_DOKYLGEN_() {
DOKYSKEY=""
LOCGEN=":"
}
if [[ "${LCR:-}" -eq 3 ]] || [[ "${LCR:-}" -eq 4 ]] || [[ "${LCR:-}" -eq 5 ]] || [[ -z "${LCR:-}" ]] # equals 3 or 4 or is undefined
if [[ "${LCR:-}" -eq 3 ]] || [[ "${LCR:-}" -eq 4 ]] || [[ "${LCR:-}" -eq 5 ]] || [[ -z "${LCR:-}" ]] # LCR equals 3 or 4 or 5 or is undefined
then
_DOKEYS_
LOCGEN="locale-gen || locale-gen"
elif [[ "${LCR:-}" -eq 1 ]] # equals 1
then
_DOKYLGEN_
elif [[ "${LCR:-}" -eq 2 ]] # equals 2
elif [[ "${LCR:-}" -eq 1 ]] || [[ "${LCR:-}" -eq 2 ]] # LCR equals 1 or 2
then
_DOKYLGEN_
fi
Expand Down Expand Up @@ -234,18 +230,22 @@ fi
cat >> root/bin/"$BINFNSTP" <<- EOM
$DOKYSKEY
EOM
if [[ "${LCR:-}" -eq 3 ]] || [[ "${LCR:-}" -eq 4 ]] || [[ "${LCR:-}" -eq 5 ]] || [[ -z "${LCR:-}" ]] # LCR equals 3 or 4 or 5 or is undefined
then
if [[ "$CPUABI" = "$CPUABIX86_64" ]]
then
printf "%s\\n" "pacman -Su grep gzip patch sed sudo unzip --noconfirm --color=always || pacman -Su gzip patch sed sudo unzip --noconfirm --color=always || _PMFSESTRING_ \"pacman -Su gzip patch sed sudo unzip $BINFNSTP ${0##/*}\"" >> root/bin/"$BINFNSTP"
elif [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = i386 ]]
then
printf "%s\\n" "pacman -Su patch sudo unzip --noconfirm --color=always || pacman -Su patch sudo unzip --noconfirm --color=always || _PMFSESTRING_ \"pacman -Su patch sudo unzip $BINFNSTP ${0##/*}\"" >> root/bin/"$BINFNSTP"
fi
fi
cat >> root/bin/"$BINFNSTP" <<- EOM
printf "\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n" "To generate locales in a preferred language use " "Settings > Language & Keyboard > Language " "in Android; Then run " "${0##*/} refresh" " for a full system refresh including locale generation; For a quick refresh you can use " "${0##*/} r" ". For a refresh with user directories " "${0##*/} re" " can be used."
$LOCGEN || _PMFSESTRING_ "LOCGEN $BINFNSTP ${0##/*}. Please run '$LOCGEN' again in the installed system."
EOM
printf "%s\\n" "/root/bin/addauser user || _PMFSESTRING_ \"addauser user $BINFNSTP ${0##/*}\"" >> root/bin/"$BINFNSTP"
printf "%s\\n" "printf \"\\n\\e[1;32m==> \\e[1;37mRunning TermuxArch command \\e[1;32maddauser user\\e[1;37m...\\n\"" >> root/bin/"$BINFNSTP"
printf "%s\\n" "addauser user || _PMFSESTRING_ \"addauser user $BINFNSTP ${0##/*}\"" >> root/bin/"$BINFNSTP"
cat >> root/bin/"$BINFNSTP" <<- EOM
printf "\\n\\e[1;34m%s \\e[0m" "🕛 > 🕤 Arch Linux in Termux is installed and configured 📲 "
printf "\\e]2;%s\\007" " 🕛 > 🕤 Arch Linux in Termux is installed and configured 📲"
Expand Down Expand Up @@ -276,7 +276,6 @@ then
printf "\\n\\e[1;48;5;138mScript %s\\e[0m\\n\\n" "$STARTBIN \${0##*/} WARNING: Run \${0##*/} and $INSTALLDIR/\${0##*/} from the BASH shell in Termux: Exiting..."
exit 202
fi
declare -g AR2AR="\${@:2}"
declare -g AR3AR="\${@:3}"
_PRINTUSAGE_() {
printf "\\e]2;%s\\007" "TermuxArch $STARTBIN help 📲"
Expand Down Expand Up @@ -309,7 +308,7 @@ touch $INSTALLDIR/root/.chushlogin
set +Eeuo pipefail
umask 0022
EOM
printf "%s\\n" "$PROOTSTMNT /bin/bash -lc \"\$AR2AR\" ||:" >> "$STARTBIN"
printf "%s\\n" "$PROOTSTMNT /bin/bash -lc \"\$2\" ||:" >> "$STARTBIN"
cat >> "$STARTBIN" <<- EOM
set -Eeuo pipefail
printf '\033]2; $STARTBIN command 📲 \007'
Expand All @@ -321,7 +320,7 @@ printf '\033]2; $STARTBIN login user [options] 📲 \007'
set +Eeuo pipefail
umask 0022
EOM
printf "%s\\n" "$PROOTSTMNTUU /bin/su - \"\$AR2AR\" ||:" >> "$STARTBIN"
printf "%s\\n" "$PROOTSTMNTUU /bin/su - \"\$2\" ||:" >> "$STARTBIN"
cat >> "$STARTBIN" <<- EOM
set -Eeuo pipefail
printf '\033]2; $STARTBIN command 📲 \007'
Expand All @@ -333,7 +332,7 @@ printf '\033]2; $STARTBIN login user [options] 📲 \007'
set +Eeuo pipefail
umask 0022
EOM
printf "%s\\n" "$PROOTSTMNTU /bin/su - \"\$AR2AR\" ||:" >> "$STARTBIN"
printf "%s\\n" "$PROOTSTMNTU /bin/su - \"\$2\" ||:" >> "$STARTBIN"
cat >> "$STARTBIN" <<- EOM
set -Eeuo pipefail
printf '\033]2; $STARTBIN login user [options] 📲 \007'
Expand All @@ -344,7 +343,7 @@ printf '\033]2; $STARTBIN raw ARGS 📲 \007'
set +Eeuo pipefail
umask 0022
EOM
printf "%s\\n" "$PROOTSTMNT /bin/\"\$AR2AR\" ||:" >> "$STARTBIN"
printf "%s\\n" "$PROOTSTMNT /bin/\"\$2\" ||:" >> "$STARTBIN"
cat >> "$STARTBIN" <<- EOM
set -Eeuo pipefail
printf '\033]2; $STARTBIN raw ARGS 📲 \007'
Expand Down Expand Up @@ -382,7 +381,7 @@ chmod 700 "$STARTBIN"
_MAKESYSTEM_() {
_WAKELOCK_
_CALLSYSTEM_
_TASPINNER_ clock & _MD5CHECK_ ; kill $!
_MD5CHECK_
_PRINTCU_
[[ "$KEEP" -ne 0 ]] && rm -f "$INSTALLDIR"/*.tar.gz "$INSTALLDIR"/*.tar.gz.md5 # set KEEP to 0 in file 'knownconfigurations.bash' after using either 'setupTermuxArch bloom' or 'setupTermuxArch manual' to keep the INSTALLDIR/*.tar.gz and INSTALLDIR/*.tar.gz.md5 files.
_PRINTDONE_
Expand Down Expand Up @@ -417,6 +416,7 @@ cd "$INSTALLDIR"
_PREPROOTDIR_
_SETLANGUAGE_
_ADDADDS_
_DOMODdotfiles_
_MAKEFINISHSETUP_
_MAKESETUPBIN_
_MAKESTARTBIN_
Expand All @@ -425,11 +425,11 @@ _FIXOWNER_
}

_PREPROOT_() {
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX86_64" ]] || [[ "$CPUABI" = i386 ]]
if [[ "$CPUABI" = "$CPUABIX86" ]] || [[ "$CPUABI" = "$CPUABIX86_64" ]] || [[ "$CPUABI" = i386 ]] || [[ "$IFILE" == *i686* ]]
then
proot --link2symlink -0 bsdtar -p -xf "$IFILE" --strip-components 1
_TASPINNER_ clock & proot --link2symlink -0 bsdtar -p -xf "$IFILE" --strip-components 1 ; kill $!
else
proot --link2symlink -0 bsdtar -p -xf "$IFILE"
_TASPINNER_ clock & proot --link2symlink -0 bsdtar -p -xf "$IFILE" ; kill $!
fi
}

Expand Down
Loading

0 comments on commit 009b624

Please sign in to comment.