-
Notifications
You must be signed in to change notification settings - Fork 0
/
motd.sh
60 lines (43 loc) · 1.69 KB
/
motd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/data/data/com.termux/files/usr/bin/bash
# Setup TERMUX_APP_PACKAGE_MANAGER
source "/data/data/com.termux/files/usr/bin/termux-setup-package-manager" || exit 1
terminal_width="$(stty size | cut -d" " -f2)"
if [[ "$terminal_width" =~ ^[0-9]+$ ]] && [ "$terminal_width" -gt 60 ]; then
motd="
\e[47m \e[0m \e[1mWelcome to QuineOS!\e[0m
\e[47m \e[0m \e[0;37m\e[47m .\e[0m
\e[47m \e[0m \e[47m \e[0m \e[47m \e[0m \e[1mDocs:\e[0m \e[4mhttps://projectquine.github.io/quineOS\e[0m
\e[47m \e[0m \e[47m \e[0m \e[47m \e[0m \e[1mCommunity:\e[0m \e[4mhttps://projectquine.github.io/quineOS/community\e[0m
\e[47m \e[0m \e[47m \e[0m \e[1mQuineOS version:\e[0m ${QUINEOS_VERSION-Unknown}
"
motd_indent=" "
else
motd="
\e[1mWelcome to QuineOS!\e[0m
\e[1mDocs:\e[0m \e[4mhttps://projectquine.github.io/quineOS\e[0m
\e[1mQuineOS version:\e[0m 0.0.1
"
motd_indent=""
fi
motd+="
${motd_indent}\e[1mWorking with packages:\e[0m
${motd_indent}\e[1mSearch:\e[0m pkg search <query>
${motd_indent}\e[1mInstall:\e[0m pkg install <package>
${motd_indent}\e[1mUpgrade:\e[0m pkg upgrade
"
if [ "$TERMUX_APP_PACKAGE_MANAGER" = "apt" ]; then
motd+="
${motd_indent}\e[1mSubscribing to additional repos:\e[0m
${motd_indent}\e[1mRoot:\e[0m pkg install root-repo
${motd_indent}\e[1mX11:\e[0m pkg install x11-repo
${motd_indent}For fixing any repository issues,
${motd_indent}try 'termux-change-repo' command.
"
fi
motd+="
${motd_indent}Report issues at \e[4mhttps://github.com/projectquine/quineOS/issues\e[0m
"
motd+="
${motd_indent}Don't forget to change your password from the default by running: passwd
"
echo -e "$motd"