File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed
terminal/ui/screens/terminal Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ ALPINE_DIR=$PREFIX/local/alpine
33mkdir -p $ALPINE_DIR
44
55if [ -z " $( ls -A " $ALPINE_DIR " ) " ]; then
6- echo " Extracting files..."
76 tar -xf $PREFIX /files/alpine.tar.gz -C $ALPINE_DIR
87fi
98
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ cd "$XPWD"
66export PS1=" \[\e[38;5;46m\]\u\[\033[39m\]@karbon \[\033[39m\]\w \[\033[0m\]\\ $ "
77# shellcheck disable=SC2034
88export PIP_BREAK_SYSTEM_PACKAGES=1
9- required_packages=" bash gcompat glib git nano sudo file "
9+ required_packages=" bash gcompat glib nano"
1010missing_packages=" "
1111for pkg in $required_packages ; do
1212 if ! apk info -e $pkg > /dev/null 2>&1 ; then
Original file line number Diff line number Diff line change 11package com.rk.terminal.ui.screens.terminal
22
33import android.os.Environment
4+ import com.rk.libcommons.alpineDir
45import com.rk.libcommons.application
56import com.rk.libcommons.child
67import com.rk.libcommons.createFileIfNot
@@ -93,6 +94,21 @@ object MkSession {
9394 }
9495 }
9596
97+ alpineDir().child(" etc/motd" ).apply {
98+ if (exists()){
99+ writeText(""" Welcome to ReTerminal!
100+
101+ The Alpine Wiki contains a large amount of how-to guides and general
102+ information about administrating Alpine systems.
103+ See <https://wiki.alpinelinux.org/>.
104+
105+ Installing : apk install <pkg>
106+ Updating : apk update && apk upgrade
107+
108+ """ .trimIndent())
109+ }
110+ }
111+
96112 pendingCommand?.env?.let {
97113 env.addAll(it)
98114 }
Original file line number Diff line number Diff line change @@ -17,5 +17,15 @@ class UpdateManager {
1717 initFile.createFileIfNot()
1818 initFile.writeText(application!! .assets.open(" init-host.sh" ).bufferedReader().use { it.readText() })
1919 }
20+
21+ val initFilex: File = localBinDir().child(" init" )
22+ if (initFilex.exists()){
23+ initFilex.delete()
24+ }
25+
26+ if (initFilex.exists().not ()){
27+ initFilex.createFileIfNot()
28+ initFilex.writeText(application!! .assets.open(" init.sh" ).bufferedReader().use { it.readText() })
29+ }
2030 }
2131}
You can’t perform that action at this time.
0 commit comments