source: npl/syncupdates @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 1.4 KB
RevLine 
[c5c522c]1#!/bin/bash
2
3
4HOST="updates@www.syn-3.nl";
5
6OPTS="" ./sshkeyfix $HOST || exit 1
7
8ssh  $HOST "ls" > /tmp/updates.txt || exit 1
9
10#dit moet eerst:
11echo "Updating local svn tree, to get log-entries up to date:"
12svn update || exit 1
13#svn update overig/webint/src || exit 1
14
15export FILTER
16if [ "$1" ]; then
17        FILTER="$1.pkg";
18else
19        FILTER="*.pkg";
20fi
21
22
23echo "Searching packages..."
24for PKG in `find . -name "$FILTER"`; do
25        echo $PKG
26
27        #dont upload _dev stuff, we dont use it and it wastes space and time :)
28        if echo $PKG | egrep "(_dev|_src)" >/dev/null; then
29                continue;
30        fi
31   
32        echo -n "Verifying update $PKG...";
33        TGZ=`./pkgname $PKG` || exit 1
34
35
36        MOD=
37        if egrep 'mod.tgz$'<<<$TGZ >/dev/null || egrep 'new.tgz$'<<<$TGZ >/dev/null; then
38            MOD=1
39        fi
40
41        #dont upload mods by default
42        if [ "$MOD" ] && ! [ "$MODS" ]; then
43                echo "NOT uploading uncommitted version. (use 'MODS=1 $0 .... ' to upload anyway)"
44                continue
45        fi
46
47
48        #skip already uploaded shit, but always upload mods, when enabled
49        if [ "$MOD" ] || ! grep -x "$TGZ" /tmp/updates.txt >/dev/null
50        then
51                if [ -f `dirname $PKG`/dontupdate ]; then
52                        echo "Skipping $TGZ"
53                else
54                        echo "Uploading $TGZ..."
55                        chmod 755 $PKG
56                        rsync -a  $PKG $HOST:$TGZ || exit 1
57                        svn log -v `dirname $PKG`|ssh  $HOST "cat > $TGZ.log" || exit 1
58                fi
59        else
60                echo -e -n "\r                                                                               \r"
61        fi
62done
63echo "DONE";
Note: See TracBrowser for help on using the repository browser.