-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathship-cm3-www
More file actions
executable file
·84 lines (78 loc) · 1.64 KB
/
ship-cm3-www
File metadata and controls
executable file
·84 lines (78 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh
RSYNCOPTS="${RSYNCOPTS:- -L}"
SHIP="$0"
if [ -z "${REMOTE}" ] ; then
REMOTE="$USER@modula3.elegosoft.com:/var/www/modula3.elegosoft.com/cm3"
#REMOTE="${REMOTE} m3@www.m3.org:html/cm3"
fi
usage() {
echo ""
echo "$SHIP [-n][-v]"
echo ""
echo " update the web servers at \$REMOTE,"
echo ""
for r in ${REMOTE}; do
echo " ${r},"
done
echo ""
echo " recursively using rsync over ssh."
echo ""
echo "Options:"
echo ""
echo " -n no action (do nothing)"
echo " -v be verbose"
echo ""
}
if [ "$1" = "-h" ] ; then
usage
exit 0
fi
N=""
NOPT=""
if [ "$1" = "-n" ] ; then
N="echo"
NOPT="-n"
shift
fi
VERBOSE=""
if [ "$1" = "-v" ] ; then
VERBOSE="-v"
shift
fi
fns=""
while [ -n "$1" ]; do
fns="$fns $1"
shift
done
for r in ${REMOTE}; do
if [ "x${VERBOSE}" = x-v ] ; then
echo "updating remote site ${r}..."
fi
if [ -z "$fns" ]; then
RSYNC_RSH=ssh rsync ${NOPT} ${VERBOSE} -C ${RSYNCOPTS} -ruptl \
--exclude=doc \
--exclude=PkgTags \
--exclude=tmp \
--exclude=\*~ \
--exclude=\*.flc \
--exclude=www-install.sh \
--exclude=ship-cm3-www \
--exclude=ship-cm3-testing \
--exclude=uploaded-archives \
* ${r}
else
for f in $fns; do
RSYNC_RSH=ssh rsync ${NOPT} ${VERBOSE} -C ${RSYNCOPTS} -uptl \
--exclude=PkgTags \
--exclude=tmp \
--exclude=\*~ \
--exclude=\*.flc \
--exclude=www-install.sh \
--exclude=ship-cm3-www \
--exclude=ship-cm3-testing \
--exclude=uploaded-archives \
${f}/* ${r}/${f}
done
fi
done
# --exclude=doc/src_reports/*.ps* \