-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmanifestdateienerzeugen-FAKE.sh
executable file
·65 lines (61 loc) · 2.54 KB
/
manifestdateienerzeugen-FAKE.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
62
63
64
#!/bin/bash
PRIORITY=0
cd $1
datum='2016-01-01 14:24:59+00:00'
for i in stable beta experimental; do
echo "BRANCH=$i" > $i.manifest
echo "DATE=$datum" >> $i.manifest
echo "PRIORITY=$PRIORITY" >> $i.manifest
echo >> $i.manifest
for j in *bin; do
model=${j#*-*-*-*}
model=${model%-sysupgrade.bin}
version=${j#*-*-}
version=${version%-$model-sysupgrade.bin}
version="v2018.2.2+9.9.9"
pruefsumme256file=`sha256sum $j|sed -e 's/ / /g'`
pruefsumme512file=`sha512sum $j|sed -e 's/ / /g'`
pruefsumme256=`sha256sum $j|sed -e 's/ .*//'`
pruefsumme512=`sha512sum $j|sed -e 's/ .*//'`
originalFile=$(readlink -f $j)
fileSize=$(stat -c %s "$originalFile")
echo "$model $version $pruefsumme256 $fileSize $j" >> $i.manifest
echo "$model $version $pruefsumme256 $j" >> $i.manifest
echo "$model $version $pruefsumme512 $j" >> $i.manifest
echo "$i $model $version"
done
for j in *tar; do
model=${j#*-*-*-*}
model=${model%-sysupgrade.tar}
version=${j#*-*-}
version=${version%-$model-sysupgrade.tar}
version="v2018.2.2+9.9.9"
pruefsumme256file=`sha256sum $j|sed -e 's/ / /g'`
pruefsumme512file=`sha512sum $j|sed -e 's/ / /g'`
pruefsumme256=`sha256sum $j|sed -e 's/ .*//'`
pruefsumme512=`sha512sum $j|sed -e 's/ .*//'`
originalFile=$(readlink -f $j)
fileSize=$(stat -c %s "$originalFile")
echo "$model $version $pruefsumme256 $fileSize $j" >> $i.manifest
echo "$model $version $pruefsumme256" >> $i.manifest
echo "$model $version $pruefsumme512" >> $i.manifest
echo "$i $model $version"
done
for j in *img.gz; do
model=${j#*-*-*-*}
model=${model%-sysupgrade.img.gz}
version=${j#*-*-}
version=${version%-$model-sysupgrade.img.gz}
version="v2018.2.2+9.9.9"
pruefsumme256file=`sha256sum $j|sed -e 's/ / /g'`
pruefsumme512file=`sha512sum $j|sed -e 's/ / /g'`
pruefsumme256=`sha256sum $j|sed -e 's/ .*//'`
pruefsumme512=`sha512sum $j|sed -e 's/ .*//'`
originalFile=$(readlink -f $j)
fileSize=$(stat -c %s "$originalFile")
echo "$model $version $pruefsumme256 $fileSize $j" >> $i.manifest
echo "$model $version $pruefsumme256" >> $i.manifest
echo "$model $version $pruefsumme512" >> $i.manifest
echo "$i $model $version"
done
done