forked from fiedka/fiedka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenpages.sh
executable file
·37 lines (34 loc) · 1.01 KB
/
genpages.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
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Please provide the name of your firmware image."
exit 1
fi
FIRMWARE_IMAGE=$1
case $2 in
"all")
echo "Generating ${FIRMWARE_IMAGE}.all"
sed "s#{FIRMWARE_IMAGE}#${FIRMWARE_IMAGE}#" \
src/templates/all.tmpl > src/pages/"${FIRMWARE_IMAGE}.all.jsx"
;;
"psp")
echo "Generating ${FIRMWARE_IMAGE}.psp"
sed "s#{FIRMWARE_IMAGE}#${FIRMWARE_IMAGE}#" \
src/templates/psp.tmpl > src/pages/"${FIRMWARE_IMAGE}.psp.jsx"
;;
"uefi")
echo "Generating ${FIRMWARE_IMAGE}.uefi"
sed "s#{FIRMWARE_IMAGE}#${FIRMWARE_IMAGE}#" \
src/templates/uefi.tmpl > src/pages/"${FIRMWARE_IMAGE}.uefi.jsx"
;;
"ufp")
echo "Generating ${FIRMWARE_IMAGE}.ufp"
sed "s#{FIRMWARE_IMAGE}#${FIRMWARE_IMAGE}#" \
src/templates/ufp.tmpl > src/pages/"${FIRMWARE_IMAGE}.ufp.jsx"
;;
*)
echo "Generating ${FIRMWARE_IMAGE}"
sed "s#{FIRMWARE_IMAGE}#${FIRMWARE_IMAGE}#" \
src/templates/utk.tmpl > src/pages/"${FIRMWARE_IMAGE}.utk.jsx"
;;
esac