]> Pileus Git - ~andy/fetchmail/blob - website/host-scripts/upload-website.sh
Add Esperanto-language translation.
[~andy/fetchmail] / website / host-scripts / upload-website.sh
1 #! /bin/sh
2
3 # Script to upload fetchmail website from Git repository
4 # (C) 2008 - 2010 by Matthias Andree. GNU GPL v3.
5
6 : ${BERLIOS_LOGIN=m-a}
7 : ${SOURCEFORGE_LOGIN=m-a}
8
9 # abort on error
10 set -eu
11
12 # cd to parent of script
13 cd "$(dirname "$0")"
14 cd ..
15
16 echo "==>  Running sanity checks"
17 # make sure we have no dangling symlinks
18 if LC_ALL=C file * | egrep broken\|dangling ; then
19     echo "broken symlinks -> abort" >&2
20     exit 1
21 fi
22
23 pids=
24
25 echo "==>  Uploading website (rsync) to BerliOS"
26 # upload
27 rsync \
28     --chmod=ug=rwX,o=rX,Dg=s --perms \
29     --copy-links --times --checksum --verbose \
30     --exclude host-scripts \
31     --exclude .git --exclude '*~' --exclude '#*#' \
32     * \
33     "$BERLIOS_LOGIN@shell.berlios.de:/home/groups/fetchmail/htdocs/" &
34 pids="$pids $!"
35
36 echo "==>  Uploading website (rsync) to SourceForge"
37 # upload
38 rsync \
39     --chmod=ug=rwX,o=rX,Dg=s --perms \
40     --copy-links --times --checksum --verbose \
41     --exclude host-scripts \
42     --exclude .git --exclude '*~' --exclude '#*#' \
43     * \
44     "${SOURCEFORGE_LOGIN},fetchmail@web.sourceforge.net:htdocs/" &
45 pids="$pids $!"
46
47 echo "==>  Uploading website (rsync) to local"
48 rsync \
49     --chmod=ug=rwX,o=rX,Dg=s --perms \
50     --copy-links --times --checksum --verbose \
51     --exclude host-scripts \
52     --exclude .git --exclude '*~' --exclude '#*#' \
53     * \
54     $HOME/public_html/fetchmail/info/ &
55 pids="$pids $!"
56
57 wait $pids
58
59 echo "==>  Synchronizing web dir."
60 synchome.sh
61
62 echo "==>  Done; check rsync output above for success."