ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/Deliantra-Client/util/ota-publish
Revision: 1.6
Committed: Fri Jan 27 23:13:38 2012 UTC (12 years, 5 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/bin/bash
2
3 DEST=/root/src/deliantra/arch/res/ota_update
4
5 util/checkdiff
6
7 umask 022
8
9 read EXE_VER <dist/exe_ver
10
11 perl <Changes >Changes~ -pe '
12 $_ = "" if /^\('"$EXE_VER"'\)/;
13 next unless /^#gendist#/;
14 s/^ /\t/;
15 print; $_ = "('"$EXE_VER"') '"$(date)"'\n";
16 ' || exit
17 mv Changes~ Changes
18
19 rm -f "$DEST"/*
20
21 <Changes >"$DEST"/Changes sed -ne "/^($EXE_VER)/,/^(A00000000)/p"
22
23 (
24 echo "{"
25 echo " \"Changes\" : {},"
26 for dist in dist/*.vars; do
27 dist="${dist##*/}"
28 dist="${dist%.vars}"
29
30 . dist/"$dist".vars
31
32 NAME="1.0,deliantra_S-$G_OS-$G_ARCHNAME.pck"
33 cp dist/"$dist".bin "$DEST/$NAME"
34 md5=$(md5sum -b <dist/"$dist".bin | cut -c1-32)
35 chmod 644 "$DEST/$NAME"
36 echo " \"$NAME\" : { \"exe_ver\" : \"$EXE_VER\", \"md5\" : \"$md5\" },"
37 done
38 echo "}"
39 ) >"$DEST/meta"
40
41 rsync -avzP dist/bin/. rain:/var/www/dist.schmorp.de/deliantra/ota/.
42 rain "chmod 644 /var/www/dist.schmorp.de/deliantra/ota/*.*"
43