-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.android
executable file
·160 lines (140 loc) · 7.26 KB
/
.android
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/usr/bin/env bash
#exec 2>> ${HOME}/Temporary/log
#set -xv
workingdirectory=$(pwd;);
printf '%s\n' ''
printf ' '; printf '\x1B[48;2;61;219;134m\x1B[38;2;0;0;0m%s\033[m\n' ' . '
printf ' '; printf '\x1B[48;2;61;219;134m\x1B[38;2;0;0;0m%s\033[m\n' ' /| ,. _| ,_ _ o _| '
printf ' '; printf '\x1B[48;2;61;219;134m\x1B[38;2;0;0;0m%s\033[m\n' ' . /-| / | /_| / (_) / /_| '
printf '%s\n' ''
printf ' LICENSED BY\n'
printf ' ${LICENSOR}\n'
printf '%s\n' ''
printf '%s\n' " K K V V PPP BB ' SS"
printf '%s\n' ' KK V V PPP BBB S'
printf '%s\n' ' K K V P BBB SS'
printf '%s\n' ''
printf '%s\n' ' WARNING: USE THIS SCRIPT AT YOUR OWN RISK.'
printf '%s\n' ''
printf '\033[48;2;255;165;255;0#m%s\033[m\n' " ALL THE COMPUTER PROGRAMS AND SOFTWARE ARE PROVIDED 'AS IS' WITHOUT WARRANTY"
printf '%s\n' ' OF ANY KIND. WE MAKE NO WARRANTIES, EXPRESS OR IMPLIED, THAT THEY ARE FREE'
printf '%s\n' ' OF ERROR, OR ARE CONSISTENT WITH ANY PARTICULAR STANDARD OF MERCHANTABILITY,'
printf '%s\n' ' OR THAT THEY WILL MEET YOUR REQUIREMENTS FOR ANY PARTICULAR APPLICATION. THEY'
printf '%s\n' ' SHOULD NOT BE RELIED ON FOR SOLVING A PROBLEM WHOSE INCORRECT SOLUTION COULD'
printf '%s\n' ' RESULT IN INJURY TO A PERSON OR LOSS OF PROPERTY. IF YOU DO USE THEM'
printf '%s\n' ' IN SUCH A MANNER, IT IS AT YOUR OWN RISK. THE AUTHOR AND PUBLISHER DISCLAIM'
printf '%s\n' ' ALL LIABILITY FOR DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES RESULTING FROM'
printf '%s\n' ' YOUR USE OF THE PROGRAMS.'
printf '%s\n' ''
# Display the title screen with disclaimer.
sudo -v # Ask for an administrator password.
#while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Update the sudo timestamp, until the script is over.
printf '\033[48;2;255;255;0;0#m%s\033[m\n' 'First-Party Settings: Systemwide And User-Specific Preferences'
printf '%s\n' ''
printf '\033[48;2;255;255;0;0#m%s\033[m\n' 'Second-Party Settings: User-Specific Filesystem Customs'
cd \
&& curl -#L https://github.com/kvpb/.files/tarball/main | tar -xzv --strip-components 1 --exclude={license.md,readme.md,*.docx}
&& cd ${workingdirectory}
# Download .files/ from GitHub to ${HOME}/.
if [ -d "${HOME}/.Trash" ]
then
if [ -L "${HOME}/.Trash" ]
then
rm "${HOME}/.Trash" # DO NOT APPEND A TRAILING SLASH!
mkdir "${HOME}/.Trash"
fi
else
mkdir "${HOME}/.Trash"
fi
# If .Trash is not a directory in ${HOME}/, substitute any symbolic link by or add this directory.
if [ -d "${HOME}/Misc" ]
then
if [ -L "${HOME}/Misc" ]
then
mv "${HOME}/Misc" ${HOME}/.Trash/
mkdir "${HOME}/Misc"
fi
else
mkdir "${HOME}/Misc"
fi
# If Misc is not a directory in ${HOME}/, substitute any symbolic link by or add this directory.
if [ -d "${HOME}/{Documents,Misc,Music,Pictures,Videos}/Downloads" ]
then
if [ -L "${HOME}/{Documents,Misc,Music,Pictures,Videos}/Downloads" ]
then
mv "${HOME}/{Documents,Misc,Music,Pictures,Videos}/Downloads" ${HOME}/.Trash/
mkdir "${HOME}/{Documents,Misc,Music,Pictures,Videos}/Downloads"
fi
else
mkdir "${HOME}/{Documents,Misc,Music,Pictures,Videos}/Downloads"
fi
# If Downloads is not a directory in ${HOME}/{Documents,Pictures,Music,Movies,Misc}/, substitute symbolic links by or add this directory.
#if [ -d "${HOME}/Camera" ]
#then
# if [ -L "${HOME}/Camera" ]
# then
# mv "${HOME}/Camera" ${HOME}/.Trash/
# mkdir "${HOME}/Camera"
# fi
#else
# mkdir "${HOME}/Camera"
fi
# If DCIM and Camera are not directories in ${HOME}/, substitute symbolic links by or add these directories.
ln -s ${HOME}/.files/.inputrc ${HOME}/.inputrc
#ln -s ${HOME}/.files/.shrc ${HOME}/.shrc
#ln -s ${HOME}/.files/.shinit ${HOME}/.shinit
#ln -s ${HOME}/.files/.profile ${HOME}/.profile
ln -s ${HOME}/.files/.exports ${HOME}/.exports
ln -s ${HOME}/.files/.functions ${HOME}/.functions
ln -s ${HOME}/.files/.aliases ${HOME}/.aliases
ln -s ${HOME}/.files/.bashrc ${HOME}/.bashrc
ln -s ${HOME}/.files/.bash_login ${HOME}/.bash_login
ln -s ${HOME}/.files/.bash_profile ${HOME}/.bash_profile
ln -s ${HOME}/.files/.bash_logout ${HOME}/.bash_logout
ln -s ${HOME}/.files/.bash_prompt ${HOME}/.bash_prompt
ln -s ${HOME}/.files/.zshrc ${HOME}/.zshrc
ln -s ${HOME}/.files/.zprofile ${HOME}/.zprofile
#ln -s ${HOME}/.files/.ssh ${HOME}/.ssh
ln -s ${HOME}/.files/.vimrc ${HOME}/.vimrc
ln -s ${HOME}/.files/.vim ${HOME}/.vim
ln -s ${HOME}/.files/.gitconfig ${HOME}/.gitconfig
ln -s ${HOME}/.files/.gitignore_global ${HOME}/.gitignore_global
ln -s ${HOME}/Misc/Downloads ${HOME}/Downloads/Misc
ln -s ${HOME}/Documents/Downloads ${HOME}/Downloads/Documents
ln -s ${HOME}/Pictures/Downloads ${HOME}/Downloads/Pictures
ln -s ${HOME}/Movies/Downloads ${HOME}/Downloads/Movies
ln -s ${HOME}/Music/Downloads ${HOME}/Downloads/Music
ln -s ${HOME}/Pictures/DCIM ${HOME}/DCIM
#ln -s ${HOME}/Pictures/Camera ${HOME}/Camera
# Create user-specific custom symbolic links.
:> ${HOME}/.hushlogin # Write the .hushlogin file in the current user's home folder.
printf '\033[48;2;255;255;0;0#m%s\033[m\n' 'Third-Party: Systemwide And User-Specific Xenogenetic Software & Preferences'
printf '%s\n' ''
printf '%s\n' ''
printf '%s\n' 'Android has been configured.'# ${litcyan} # https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md
printf '%s\n' 'A reboot is required for some of these changes to take effect. Reboot...?, \e[4my\e[0mes or \e[4mn\e[0mo?'# ${litgreen}
read -r input
if [[ ${input} =~ ^([Yy]|[Yy][Ee][Ss]|[Yy][Ee][Aa][Hh])$ ]]
then
sudo shutdown -r now # Reboot without confirmation.
else
:
fi
exit 0
# .android
# Android Configuration Script
#
# Karl V. P. B. `kvpb`
# +33 A BB BB BB BB
# local-part@domain
# Copyright 2021 Karl Vincent Pierre Bertin
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.