forked from EA7KDO/NX4832K035
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsavetheme.sh
executable file
·61 lines (51 loc) · 1.99 KB
/
savetheme.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
61
#!/bin/bash
############################################################
# Save Color Theme #
# Support code 0-9 #
# #
# #
# #
# KF6S 05-07-2020 #
############################################################
set -o errexit
set -o pipefail
if [ "$1" = 0 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Original" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 1 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Black" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 2 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Green" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 3 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Yellow" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 4 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Blue" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 5 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Red" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 6 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Custom6" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 7 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Custom7" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 8 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Custom8" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi
if [ "$1" = 9 ]; then
sudo rm -f /usr/local/etc/Nextion_Support/ColorTheme.txt
sudo echo "Custom9" >> /usr/local/etc/Nextion_Support/ColorTheme.txt
fi