perl-5.22
Last change
on this file since c5d681f was
c5d681f,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
zarafa clean fixes and free diskspace checks
|
-
Property mode set to
100755
|
File size:
1.3 KB
|
Rev | Line | |
---|
[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[c5d681f] | 3 | rm -rf .tmp 2>/dev/null |
---|
[c5c522c] | 4 | HOST="updates@www.syn-3.nl"; |
---|
| 5 | |
---|
| 6 | OPTS="" ./sshkeyfix $HOST || exit 1 |
---|
| 7 | |
---|
| 8 | ssh $HOST "ls" > /tmp/updates.txt || exit 1 |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | export FILTER |
---|
| 12 | if [ "$1" ]; then |
---|
| 13 | FILTER="$1.pkg"; |
---|
| 14 | else |
---|
| 15 | FILTER="*.pkg"; |
---|
| 16 | fi |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | echo "Searching packages..." |
---|
| 20 | for PKG in `find . -name "$FILTER"`; do |
---|
| 21 | |
---|
| 22 | #dont upload _dev stuff, we dont use it and it wastes space and time :) |
---|
| 23 | if echo $PKG | egrep "(_dev|_src)" >/dev/null; then |
---|
| 24 | continue; |
---|
| 25 | fi |
---|
| 26 | |
---|
[c5d681f] | 27 | #echo -n "Verifying update $PKG..."; |
---|
[c5c522c] | 28 | TGZ=`./pkgname $PKG` || exit 1 |
---|
| 29 | |
---|
| 30 | MOD= |
---|
| 31 | if egrep 'mod.tgz$'<<<$TGZ >/dev/null || egrep 'new.tgz$'<<<$TGZ >/dev/null; then |
---|
| 32 | MOD=1 |
---|
| 33 | fi |
---|
| 34 | |
---|
| 35 | #dont upload mods by default |
---|
| 36 | if [ "$MOD" ] && ! [ "$MODS" ]; then |
---|
[c5d681f] | 37 | echo "NOT uploading uncommitted version. (use 'MODS=1 $0 .... ' to upload anyway): $PKG" |
---|
[c5c522c] | 38 | continue |
---|
| 39 | fi |
---|
| 40 | |
---|
| 41 | |
---|
[e15a700] | 42 | #skip already uploaded stuff, but always upload mods, when enabled |
---|
[c5c522c] | 43 | if [ "$MOD" ] || ! grep -x "$TGZ" /tmp/updates.txt >/dev/null |
---|
| 44 | then |
---|
| 45 | if [ -f `dirname $PKG`/dontupdate ]; then |
---|
| 46 | echo "Skipping $TGZ" |
---|
| 47 | else |
---|
| 48 | echo "Uploading $TGZ..." |
---|
| 49 | chmod 755 $PKG |
---|
| 50 | rsync -a $PKG $HOST:$TGZ || exit 1 |
---|
[e15a700] | 51 | git log --summary `dirname $PKG`|ssh $HOST "cat > $TGZ.log" || exit 1 |
---|
[c5c522c] | 52 | fi |
---|
| 53 | else |
---|
| 54 | echo -e -n "\r \r" |
---|
| 55 | fi |
---|
| 56 | done |
---|
| 57 | echo "DONE"; |
---|
Note: See
TracBrowser
for help on using the repository browser.