Skip to content

Commit 1202f8d

Browse files
upgrade to exta conf
1 parent 57cc625 commit 1202f8d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

core/default/mate/extra-config.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@
33
sudo -n true
44
echo "==[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
640
echo "setting up udroid user..."
741
useradd -m \
842
-p "$(openssl passwd -1 secret)" \

0 commit comments

Comments
 (0)