Develop and Download Open Source Software

Browse CVS Repository

Diff of /samurai-graph/web/rsync.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.1.1 by orrisroot, Thu May 27 10:52:53 2004 UTC revision 1.4 by orrisroot, Tue Feb 8 14:55:04 2005 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  RSYNC=/usr/local/bin/rsync  RSYNC=`which rsync`
3    if [ x"$RSYNC" = x ]; then
4     echo "error : rsync command required"
5     exit 1;
6    fi
7  RSYNC_OPTS="-rlvzC --delete"  RSYNC_OPTS="-rlvzC --delete"
8  RSYNC_RSH=ssh  RSYNC_RSH=ssh
9    export RSYNC_RSH
10  SRC=`dirname $0`/htdocs  SRC=`dirname $0`/htdocs
11  DSTDIR=/home/groups/s/sa/samurai-graph  DSTDIR=/home/groups/s/sa/samurai-graph
12  SFJP_SHELL_HOSTNAME=sf-usr-shell  SFJP_SHELL_HOSTNAME=sf-usr-shell
13  SFJP_HOST=shell.sourceforge.jp  SFJP_HOST=shell.sourceforge.jp
14    
15    FIND_DIR="find $DSTDIR/htdocs/* -type d"
16    FIND_FILE="find $DSTDIR/htdocs -type f"
17    
18  if [ `hostname -s` = $SFJP_SHELL_HOSTNAME ]; then  if [ `hostname -s` = $SFJP_SHELL_HOSTNAME ]; then
19    DST=$DSTDIR    DST=$DSTDIR
20  else  else
# Line 18  if [ ! -d $SRC ]; then Line 26  if [ ! -d $SRC ]; then
26    exit 1;    exit 1;
27  fi  fi
28  $RSYNC $RSYNC_OPTS  $SRC $DST  $RSYNC $RSYNC_OPTS  $SRC $DST
29    
30    # added group write permission
31    if [ `hostname -s` = $SFJP_SHELL_HOSTNAME ]; then
32      chmod 775 `$FIND_DIR`
33      chmod 664 `$FIND_FILE`
34    else
35      ssh $SFJP_HOST "chmod 775 \`$FIND_DIR\`"
36      ssh $SFJP_HOST "chmod 664 \`$FIND_FILE\`"
37    fi
38    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.4

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26