-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathformat_n_verify.sh
More file actions
executable file
·164 lines (148 loc) · 5.22 KB
/
Copy pathformat_n_verify.sh
File metadata and controls
executable file
·164 lines (148 loc) · 5.22 KB
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
161
162
163
164
#!/bin/bash
run_id () {
cat ./device/${device}/id.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
}
run_img () {
if [ -f ./device/${device}/xfce-lts-618.yml ] ; then
cat ./device/${device}/xfce-lts-618.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/xfce-stable.yml ] ; then
cat ./device/${device}/xfce-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/xfce-ti-stable.yml ] ; then
cat ./device/${device}/xfce-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/iot-lts-618.yml ] ; then
cat ./device/${device}/iot-lts-618.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/iot-stable.yml ] ; then
cat ./device/${device}/iot-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/iot-ti-stable.yml ] ; then
cat ./device/${device}/iot-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/workshop-lts-618.yml ] ; then
cat ./device/${device}/workshop-lts-618.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/workshop-ti-stable.yml ] ; then
cat ./device/${device}/workshop-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/base-compat.yml ] ; then
cat ./device/${device}/base-compat.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/base-lts-618.yml ] ; then
cat ./device/${device}/base-lts-618.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/base-lts-612.yml ] ; then
cat ./device/${device}/base-lts-612.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/base-ti-stable.yml ] ; then
cat ./device/${device}/base-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/base-stable.yml ] ; then
cat ./device/${device}/base-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/ti-edgeai.yml ] ; then
cat ./device/${device}/ti-edgeai.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/old-base-compat.yml ] ; then
cat ./device/${device}/old-base-compat.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/old-base-lts-618.yml ] ; then
cat ./device/${device}/old-base-lts-618.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/old-base-lts-612.yml ] ; then
cat ./device/${device}/old-base-lts-612.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/old-base-stable.yml ] ; then
cat ./device/${device}/old-base-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
}
run_flasher_img () {
if [ -f ./device/${device}/flasher-xfce-stable.yml ] ; then
cat ./device/${device}/flasher-xfce-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/flasher-xfce-ti-stable.yml ] ; then
cat ./device/${device}/flasher-xfce-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/flasher-base-stable.yml ] ; then
cat ./device/${device}/flasher-base-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
if [ -f ./device/${device}/flasher-base-ti-stable.yml ] ; then
cat ./device/${device}/flasher-base-ti-stable.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
}
run_test_img () {
if [ -f ./device/${device}/test-xfce-v6.12.x.yml ] ; then
cat ./device/${device}/test-xfce-v6.12.x.yml | sed 's/^/ /' >> ./id.yml
echo "" >> ./id.yml
fi
}
if [ ! -f /usr/bin/jq ] ; then
echo "jq binary missing"
exit 2
fi
if [ ! -f /usr/bin/yq ] ; then
echo "yq binary missing"
exit 2
fi
cat ./device/static/id_header.yml > ./id.yml
device="beagle-am67" ; run_id
device="beagle-am62" ; run_id
device="pocketbeagle2-am62" ; run_id
device="beagle-tda4vm" ; run_id
device="beaglev-fire" ; run_id
device="beagle-am335" ; run_id
echo "os_list:" >> ./id.yml
device="beagle-am67" ; run_img
device="beagle-am62" ; run_img
device="pocketbeagle2-am62" ; run_img
device="beagle-tda4vm" ; run_img
device="beagle-am335" ; run_img
device="beaglev-fire" ; run_img
#echo " - name: eMMC Flashing (other)" >> ./id.yml
#echo " description: These images will Flash the onboard eMMC on first bootup" >> ./id.yml
#echo " icon: https://media.githubusercontent.com/media/beagleboard/bb-imager-rs/refs/heads/main/assets/os/debian.png" >> ./id.yml
#echo " subitems:" >> ./id.yml
#
#device="beagle-am62" ; run_flasher_img
#device="beagle-tda4vm" ; run_flasher_img
#echo " - name: Testing Images (other)" >> ./id.yml
#echo " description: Here be Dragons, images for testing!!!" >> ./id.yml
#echo " icon: https://media.githubusercontent.com/media/beagleboard/bb-imager-rs/refs/heads/main/assets/os/debian.png" >> ./id.yml
#echo " subitems:" >> ./id.yml
#device="beagle-am67" ; run_test_img
if [ -f /usr/bin/yq ] ; then
cat ./id.yml | yq > os_list.json
fi
rm ./id.yml
if [ -f /usr/bin/jq ] ; then
cat os_list.json | jq > os_list.json.bak
mv os_list.json.bak os_list.json
fi
if [ -f /usr/bin/jsonlint-php ] ; then
jsonlint-php os_list.json
fi