forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish_firmware
executable file
·90 lines (81 loc) · 3.13 KB
/
publish_firmware
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
#!/bin/zsh
current=$(git --git-dir=./env/.git rev-parse --abbrev-ref HEAD)
B=("${(@s/_/)current}")
BRANCH=$B[1]
SUBTYPE="generic"
case $B[2] in
dlink)
ARCH="ath79"
;;
tplink)
ARCH="ar71xx"
;;
dwr921)
ARCH="ramips"
SUBTYPE="mt7620"
;;
*)
esac
while getopts "a:r:" OPTION
do
case $OPTION in
a)
ARCH=$OPTARG
;;
r)
BRANCH=$OPTARG
;;
?)
exit
;;
esac
done
VERSION=1907
if [ -z $ARCH ]
then
echo Architecture niet opgegeven!
exit
fi
currdir=$(pwd)
cd ~/Projects/openwrt/bin/targets/$ARCH/$SUBTYPE
pwd
server="gratwifi:apps/gratwifi/current/public/files"
case $BRANCH in
v2)
server="api:/var/www/dl/firmwares"
;;
* )
esac
echo "server: $server"
case $ARCH in
ar71xx)
scp gratwifi-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin $server/firmware-$VERSION-tl-wr1043nd-v1.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin $server/firmware-$VERSION-tl-wr1043nd-v2.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v3-squashfs-factory.bin $server/firmware-$VERSION-tl-wr1043nd-v3.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v4-squashfs-factory.bin $server/firmware-$VERSION-tl-wr1043nd-v4.bin
scp gratwifi-ar71xx-generic-tl-wr1043n-v5-squashfs-factory.bin $server/firmware-$VERSION-tl-wr1043n-v5.bin
# scp gratwifi-ar71xx-generic-esr900-squashfs-factory.dlf $server/firmware-$VERSION-esr900.dlf
scp gratwifi-ar71xx-generic-archer-c5-v1-squashfs-factory.bin $server/firmware-$VERSION-tl-ac1200-v1.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-wr1043nd-v1.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-wr1043nd-v2.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v3-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-wr1043nd-v3.bin
scp gratwifi-ar71xx-generic-tl-wr1043nd-v4-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-wr1043nd-v4.bin
scp gratwifi-ar71xx-generic-tl-wr1043n-v5-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-wr1043n-v5.bin
# scp gratwifi-ar71xx-generic-esr900-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-esr900.bin
scp gratwifi-ar71xx-generic-archer-c5-v1-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-ac1200-v1.bin
;;
bcm53xx)
scp gratwifi-bcm53xx-tplink-archer-c5-v2-squashfs.bin $server/firmware-$VERSION-tl-ac1200-v2.bin
;;
ath79)
scp gratwifi-ath79-generic-dlink_dir-842-c3-squashfs-factory.bin $server/firmware-$VERSION-dlink_dir-842-c3.bin
scp gratwifi-ath79-generic-dlink_dir-842-c3-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-dlink_dir-842-c3.bin
scp gratwifi-ath79-generic-tplink_archer-c7-v5-squashfs-factory.bin $server/firmware-$VERSION-tl-c7-v5.bin
scp gratwifi-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-tl-c7-v5.bin
;;
ramips)
scp gratwifi-ramips-mt7620-dlink_dwr-921-c3-squashfs-factory.bin $server/firmware-$VERSION-dlink_dwr-921-c3.bin
scp gratwifi-ramips-mt7620-dlink_dwr-921-c3-squashfs-sysupgrade.bin $server/sysupgrade-$VERSION-dlink_dwr-921-c3.bin
;;
esac
cd $currdir