File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 33sudo -n true
44echo " ==[START]=="
55
6+ function list_parser() {
7+ export count
8+ export include_list
9+
10+ count=0
11+ include_list=" "
12+
13+ list_file=$1
14+
15+ if [ -f " $list_file " ]; then
16+ buffer=$( cat " $list_file " )
17+ for line in $buffer ; do
18+ (( count++ ))
19+ include_list+=" $line "
20+ done
21+ else
22+ echo " File $list_file not found.."
23+ fi
24+ }
25+
26+ function if_found_install_extras() {
27+ include_file=" /root/include-i.list"
28+ if [ -f $include_file ]; then
29+ list_parser " $include_file "
30+ if [ -n " $include_list " ]; then
31+ apt install -y --force-yes " $include_list "
32+ else
33+ echo " No extra packages to install. FileEmpty.."
34+ fi
35+ fi
36+ }
37+ # ######################################
38+
39+ if_found_install_extras
640echo " setting up udroid user..."
741useradd -m \
842 -p " $( openssl passwd -1 secret) " \
You can’t perform that action at this time.
0 commit comments