Skip to content

Commit

Permalink
Commit on 20180903 branch master 70746909049856
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRausty committed Sep 3, 2018
1 parent f0124c9 commit 7e8a4e6
Show file tree
Hide file tree
Showing 21 changed files with 241 additions and 274 deletions.
8 changes: 4 additions & 4 deletions archlinuxconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ addch() {
_CFLHDR_ root/bin/ch "# Creates .hushlogin and .hushlogout file"
cat >> root/bin/ch <<- EOM
declare -a args
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -353,7 +353,7 @@ addkeys() {
_CFLHDR_ root/bin/keys
cat >> root/bin/keys <<- EOM
declare -a keyrings
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -446,7 +446,7 @@ addpc() {
_CFLHDR_ root/bin/pc "# Pacman install packages wrapper without system update."
cat >> root/bin/pc <<- EOM
declare -g args="\$@"
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -500,7 +500,7 @@ addpci() {
_CFLHDR_ root/bin/pci "# Pacman install packages wrapper with system update."
cat >> root/bin/pci <<- EOM
declare args="\$@"
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down
10 changes: 3 additions & 7 deletions knownconfigurations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,9 @@ if [[ "$koe" ]]; then
prootstmnt+="--kill-on-exit "
fi
prootstmnt+="--link2symlink -0 -r $INSTALLDIR "
if [[ ! -r /dev/shm ]] ; then
if [[ -r /dev/ashmem ]] ; then
prootstmnt+="-b /dev/ashmem:/dev/shm "
else
prootstmnt+="-b $INSTALLDIR/tmp:/dev/shm "
fi
fi
# if [[ ! -r /dev/shm ]] ; then
# prootstmnt+="-b $INSTALLDIR/tmp:/dev/shm "
# fi
if [[ -f /proc/stat ]] ; then
if [[ ! "$(head /proc/stat)" ]] ; then
prootstmnt+="-b $INSTALLDIR/var/binds/fbindprocstat:/proc/stat "
Expand Down
2 changes: 1 addition & 1 deletion maintenanceroutines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ loadimage() {
spaceinfo
printf "\\n"
wakelock
_PREPINSTALLDIR
_PREPINSTALLDIR_
copyimage ## "$@" & spinner "Copying" "…"
_PRINTMD5CHECK_
md5check
Expand Down
13 changes: 7 additions & 6 deletions necessaryfunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ lkernid
mainblock() {
namestartarch
spaceinfo
_PREPINSTALLDIR
_PREPINSTALLDIR_
detectsystem
wakeunlock
_PRINTFOOTER_
Expand All @@ -104,7 +104,7 @@ makefinishsetup() {
binfnstp=finishsetup.sh
_CFLHDR_ root/bin/"$binfnstp"
cat >> root/bin/"$binfnstp" <<- EOM
versionid="v1.6 id7431"
versionid="v1.6 id2361"
printf "\\n\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n\\e[1;32m%s\\e[0;32m" "To generate locales in a preferred language, you can use " "Settings > Language & Keyboard > Language " "in Android. Then run " "${0##*/} r " "for a quick system refresh." "==> "
locale-gen ||:
printf "\\n\\e[1;34m:: \\e[1;37mRemoving redundant packages for Termux PRoot installation…\\n"
Expand Down Expand Up @@ -149,7 +149,7 @@ versionid="v1.6 id7431"
makesetupbin() {
_CFLHDR_ root/bin/setupbin.sh
cat >> root/bin/setupbin.sh <<- EOM
versionid="v1.6 id7431"
versionid="v1.6 id2361"
unset LD_PRELOAD
EOM
echo "$prootstmnt /root/bin/finishsetup.sh ||:" >> root/bin/setupbin.sh
Expand All @@ -158,9 +158,10 @@ versionid="v1.6 id7431"

makestartbin() {
_CFLHDR_ "$startbin"
printf "%s\\n" "${FLHDRP[@]}" >> "$startbin"
cat >> "$startbin" <<- EOM
versionid="v1.6 id7431"
unset LD_PRELOAD
versionid="v1.6 id2361"
# unset LD_PRELOAD
declare -g ar2ar="\${@:2}"
declare -g ar3ar="\${@:3}"
_PRINTUSAGE_() {
Expand Down Expand Up @@ -254,7 +255,7 @@ _PREPROOTDIR() {
mkdir -p usr/bin
}

_PREPINSTALLDIR() {
_PREPINSTALLDIR_() {
_PREPROOTDIR
_SETLANGUAGE_
addREADME
Expand Down
68 changes: 23 additions & 45 deletions printoutstatements.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
#!/bin/env bash
# Copyright 2017-2018 by SDRausty. All rights reserved. 🌎 🌍 🌏 🌐 🗺
# Hosting https://sdrausty.github.io/TermuxArch courtesy https://pages.github.com
# https://sdrausty.github.io/TermuxArch/CONTRIBUTORS Thank you for your help.
# https://sdrausty.github.io/TermuxArch/README has information about this project.
# Printout statement subroutines for `setupTermuxArch.sh`.
################################################################################

# FLHDR[0]="#!/bin/env bash"
# FLHDR[1]="# Copyright 2017-2018 by SDRausty. All rights reserved. 🌎 🌍 🌏 🌐 🗺"
# FLHDR[2]="# Hosting sdrausty.github.io/TermuxArch courtesy https://pages.github.com."
# FLHDR[3]="# https://sdrausty.github.io/TermuxArch/README has info about this project."
# FLHDR[4]="# https://sdrausty.github.io/TermuxArch/CONTRIBUTORS Thank you for your help."
# FLHDR[5]="################################################################################"
# FLHDR[7]="IFS=$'\\n\\t'"
# FLHDR[8]="set -Eeuo pipefail"
# FLHDR[9]="shopt -s nullglob globstar"
# FLHDR[10]="versionid=\"v1.6 id9909\""
# FLHDR[11]=" "
# TRPERROR[0]="_TRPERROR_() { # Run on script error."
FLHDR0[0]="#!/bin/env bash"
FLHDR0[1]="# Copyright 2017-2018 by SDRausty. All rights reserved. 🌎 🌍 🌏 🌐 🗺"
FLHDR0[2]="# Hosting sdrausty.github.io/TermuxArch courtesy https://pages.github.com."
FLHDR0[3]="# https://sdrausty.github.io/TermuxArch/README has info about this project."
Expand All @@ -27,15 +9,18 @@ FLHDR1[5]="#####################################################################
FLHDR1[7]="IFS=$'\\n\\t'"
FLHDR1[8]="set -Eeuo pipefail"
FLHDR1[9]="shopt -s nullglob globstar"
FLHDR1[10]="versionid=\"v1.6 id9909\""
FLHDR1[11]=" "
TRPERROR[0]="_TRPERROR_() { # Run on script error."
TRPERROR[1]=" local rv=\"\$?\""
TRPERROR[2]=" printf \"\\e[?25h\\n\\e[1;48;5;138m %s\\e[0m\\n\\n\" \"TermuxArch WARNING: Generated script signal \${rv:-unknown} near or at line number \${1:-unknown} by \`\${2:-command}\`!\""
FLHDR1[10]="unset LD_PRELOAD"
FLHDR1[11]="versionid=\"v1.6 id9909\""
FLHDR1[12]=" "
FLHDRP[0]="## BEGIN #######################################################################"
FLHDRP[1]="LD_PRELOAD=\"env /data/data/com.termux/files/usr/lib/libandroid-shmem.so\""
TRPERROR[0]="_TRPERR_() { # Run on script error."
TRPERROR[1]=" local RV=\"\$?\""
TRPERROR[2]=" printf \"\\e[?25h\\n\\e[1;48;5;138m %s\\e[0m\\n\\n\" \"TermuxArch WARNING: Generated script signal \${RV:-unknown} near or at line number \${1:-unknown} by \`\${2:-command}\`!\""
TRPERROR[3]=" exit 201"
TRPERROR[4]="}"
TRPERROR[5]=" "
TRPEXIT[0]="_TRPEXIT_() { # Run on exit."
TRPEXIT[0]="_TRPET_() { # Run on exit."
TRPEXIT[1]=" local RV=\"\$?\" "
TRPEXIT[2]=" printf \"\\a\\a\\a\\a\" "
TRPEXIT[3]=" sleep 0.4 "
Expand All @@ -51,40 +36,33 @@ TRPEXIT[12]=" set +Eeuo pipefail"
TRPEXIT[13]=" exit"
TRPEXIT[14]="}"
TRPEXIT[15]=" "
TRPSIGNAL[0]="_TRPSIGNAL_() { # Run on signal."
TRPSIGNAL[0]="_TRPSIG_() { # Run on signal."
TRPSIGNAL[1]=" printf \"\\e[?25h\\e[1;7;38;5;0mTermuxArch WARNING: Signal \$? received!\\e[0m\\n\""
TRPSIGNAL[2]=" rm -rf \"\$TAMPDIR\""
TRPSIGNAL[3]=" exit 211"
TRPSIGNAL[4]="}"
TRPSIGNAL[5]=" "
TRPQUIT[0]="_TRPQUIT_() { # Run on quit."
TRPQUIT[0]="_TRPQ_() { # Run on quit."
TRPQUIT[1]=" printf \"\\e[?25h\\e[1;7;38;5;0mTermuxArch WARNING: Quit signal \$? received!\\e[0m\\n\""
TRPQUIT[2]=" rm -rf \"\$TAMPDIR\""
TRPQUIT[3]=" exit 221"
TRPQUIT[4]="}"
TRPQUIT[5]=" "
TRAPS[0]="trap \"_TRPERROR_ \$LINENO \$BASH_COMMAND \$?\" ERR"
# TRAPS[1]="trap \"_TRPEXIT_ \$LINENO \$BASH_COMMAND \$?\" EXIT"
TRAPS[1]="trap _TRPEXIT_ EXIT"
TRAPS[2]="trap _TRPSIGNAL_ HUP INT TERM"
TRAPS[3]="trap _TRPQUIT_ QUIT"
TRAPS[0]="trap \"_TRPERR_ \$LINENO \$BASH_COMMAND \$?\" ERR"
TRAPS[1]="trap _TRPET_ EXIT"
TRAPS[2]="trap _TRPSIG_ HUP INT TERM"
TRAPS[3]="trap _TRPQ_ QUIT"
TRAPS[4]=" "

_CFLHDR_() { # Create file headers, and interests comments.
if [[ -z "${2:-}" ]] ; then
printf "%s\\n" "${FLHDR0[@]}" > "$1"
else
for i in {0..3} ; do
if [[ $i = 0 ]] ; then
printf "%s\\n" "${FLHDR0[i]}" > "$1"
else
printf "%s\\n" "${FLHDR0[i]}" >> "$1"
fi
done
printf "%s\\n" "${@:2}" >> "$1"
printf "%s\\n" "${FLHDR0[4]}" >> "$1"
fi
printf "%s\\n" "${FLHDR1[@]}" >> "$1"
if [[ -z "${2:-}" ]] ; then
printf "%s\\n" "${FLHDR0[@]}" > "$1"
printf "%s\\n" "${FLHDR1[@]}" >> "$1"
else
printf "%s\\n" "${FLHDR0[@]}" > "$1"
printf "%s\\n" "${@:2}" >> "$1"
printf "%s\\n" "${FLHDR1[@]}" >> "$1"
fi
printf "%s\\n" "${TRPERROR[@]}" >> "$1"
printf "%s\\n" "${TRPEXIT[@]}" >> "$1"
printf "%s\\n" "${TRPSIGNAL[@]}" >> "$1"
Expand Down
8 changes: 4 additions & 4 deletions scripts/files/stable/archlinuxconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ addch() {
_CFLHDR_ root/bin/ch "# Creates .hushlogin and .hushlogout file"
cat >> root/bin/ch <<- EOM
declare -a args
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -353,7 +353,7 @@ addkeys() {
_CFLHDR_ root/bin/keys
cat >> root/bin/keys <<- EOM
declare -a keyrings
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -446,7 +446,7 @@ addpc() {
_CFLHDR_ root/bin/pc "# Pacman install packages wrapper without system update."
cat >> root/bin/pc <<- EOM
declare -g args="\$@"
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down Expand Up @@ -500,7 +500,7 @@ addpci() {
_CFLHDR_ root/bin/pci "# Pacman install packages wrapper with system update."
cat >> root/bin/pci <<- EOM
declare args="\$@"
versionid="v1.6 id7431"
versionid="v1.6 id2361"
_TRPEXIT_() { # on exit
printf "\\e[?25h\\e[0m"
Expand Down
10 changes: 3 additions & 7 deletions scripts/files/stable/knownconfigurations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,9 @@ if [[ "$koe" ]]; then
prootstmnt+="--kill-on-exit "
fi
prootstmnt+="--link2symlink -0 -r $INSTALLDIR "
if [[ ! -r /dev/shm ]] ; then
if [[ -r /dev/ashmem ]] ; then
prootstmnt+="-b /dev/ashmem:/dev/shm "
else
prootstmnt+="-b $INSTALLDIR/tmp:/dev/shm "
fi
fi
# if [[ ! -r /dev/shm ]] ; then
# prootstmnt+="-b $INSTALLDIR/tmp:/dev/shm "
# fi
if [[ -f /proc/stat ]] ; then
if [[ ! "$(head /proc/stat)" ]] ; then
prootstmnt+="-b $INSTALLDIR/var/binds/fbindprocstat:/proc/stat "
Expand Down
2 changes: 1 addition & 1 deletion scripts/files/stable/maintenanceroutines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ loadimage() {
spaceinfo
printf "\\n"
wakelock
_PREPINSTALLDIR
_PREPINSTALLDIR_
copyimage ## "$@" & spinner "Copying" "…"
_PRINTMD5CHECK_
md5check
Expand Down
13 changes: 7 additions & 6 deletions scripts/files/stable/necessaryfunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ lkernid
mainblock() {
namestartarch
spaceinfo
_PREPINSTALLDIR
_PREPINSTALLDIR_
detectsystem
wakeunlock
_PRINTFOOTER_
Expand All @@ -104,7 +104,7 @@ makefinishsetup() {
binfnstp=finishsetup.sh
_CFLHDR_ root/bin/"$binfnstp"
cat >> root/bin/"$binfnstp" <<- EOM
versionid="v1.6 id7431"
versionid="v1.6 id2361"
printf "\\n\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n\\e[1;32m%s\\e[0;32m" "To generate locales in a preferred language, you can use " "Settings > Language & Keyboard > Language " "in Android. Then run " "${0##*/} r " "for a quick system refresh." "==> "
locale-gen ||:
printf "\\n\\e[1;34m:: \\e[1;37mRemoving redundant packages for Termux PRoot installation…\\n"
Expand Down Expand Up @@ -149,7 +149,7 @@ versionid="v1.6 id7431"
makesetupbin() {
_CFLHDR_ root/bin/setupbin.sh
cat >> root/bin/setupbin.sh <<- EOM
versionid="v1.6 id7431"
versionid="v1.6 id2361"
unset LD_PRELOAD
EOM
echo "$prootstmnt /root/bin/finishsetup.sh ||:" >> root/bin/setupbin.sh
Expand All @@ -158,9 +158,10 @@ versionid="v1.6 id7431"

makestartbin() {
_CFLHDR_ "$startbin"
printf "%s\\n" "${FLHDRP[@]}" >> "$startbin"
cat >> "$startbin" <<- EOM
versionid="v1.6 id7431"
unset LD_PRELOAD
versionid="v1.6 id2361"
# unset LD_PRELOAD
declare -g ar2ar="\${@:2}"
declare -g ar3ar="\${@:3}"
_PRINTUSAGE_() {
Expand Down Expand Up @@ -254,7 +255,7 @@ _PREPROOTDIR() {
mkdir -p usr/bin
}

_PREPINSTALLDIR() {
_PREPINSTALLDIR_() {
_PREPROOTDIR
_SETLANGUAGE_
addREADME
Expand Down
Loading

0 comments on commit 7e8a4e6

Please sign in to comment.