source: npl/syncupdates @ e15a700

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

git stuff

  • Property mode set to 100755
File size: 1.3 KB
Line 
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
11export FILTER
12if [ "$1" ]; then
13        FILTER="$1.pkg";
14else
15        FILTER="*.pkg";
16fi
17
18
19echo "Searching packages..."
20for PKG in `find . -name "$FILTER"`; do
21        echo $PKG
22
23        #dont upload _dev stuff, we dont use it and it wastes space and time :)
24        if echo $PKG | egrep "(_dev|_src)" >/dev/null; then
25                continue;
26        fi
27   
28        echo -n "Verifying update $PKG...";
29        TGZ=`./pkgname $PKG` || exit 1
30
31
32        MOD=
33        if egrep 'mod.tgz$'<<<$TGZ >/dev/null || egrep 'new.tgz$'<<<$TGZ >/dev/null; then
34            MOD=1
35        fi
36
37        #dont upload mods by default
38        if [ "$MOD" ] && ! [ "$MODS" ]; then
39                echo "NOT uploading uncommitted version. (use 'MODS=1 $0 .... ' to upload anyway)"
40                continue
41        fi
42
43
44        #skip already uploaded stuff, but always upload mods, when enabled
45        if [ "$MOD" ] || ! grep -x "$TGZ" /tmp/updates.txt >/dev/null
46        then
47                if [ -f `dirname $PKG`/dontupdate ]; then
48                        echo "Skipping $TGZ"
49                else
50                        echo "Uploading $TGZ..."
51                        chmod 755 $PKG
52                        rsync -a  $PKG $HOST:$TGZ || exit 1
53                        git log --summary `dirname $PKG`|ssh  $HOST "cat > $TGZ.log" || exit 1
54                fi
55        else
56                echo -e -n "\r                                                                               \r"
57        fi
58done
59echo "DONE";
Note: See TracBrowser for help on using the repository browser.