Changeset 1164


Ignore:
Timestamp:
Nov 13, 2013, 12:13:58 PM (10 years ago)
Author:
joergs
Message:

better handling of arguments and files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dasscm/trunk/usr/bin/dasscm_remote_update.sh

    r1163 r1164  
    88# are updated to the current content.
    99# Use only, if a local dasscm installation is not possbile!
     10
     11DIR="$1"
    1012
    1113set -o errexit -o nounset
     
    2325REMOTE_USER=${DASSCM_REMOTE_USER:-"root"}
    2426
    25 SERVER=$1
    26 
    27 if [ -z "$SERVER" ]; then
     27if [ -z "$DIR" ]; then
    2828    usage
    2929fi
    3030
    31 if [ ! -d "$SERVER" ]; then
     31if [ ! -d "$DIR" ]; then
    3232    echo
    33     echo "  failed to access directory $SERVER"
     33    echo "  failed to access directory $DIR"
    3434    usage
    3535fi
     
    3939#   If you want to add more files,
    4040#   create the file in the repository and re-run this script
    41 cd $SERVER
    42 svn up || (echo "failed to update repository $SERVER"; usage)
     41cd $DIR
     42svn up || (echo "failed to update repository $DIR"; usage)
    4343FILELIST=`mktemp`
    44 find > $FILELIST
     44svn ls -R > $FILELIST
     45SERVER=`basename "$PWD"`
    4546rsync -av --existing --files-from $FILELIST $OPTIONS $REMOTE_USER@$SERVER:/. . || (echo "FAILED to transfer dasscm files. Failed to access server $SERVER via ssh/rsync?"; usage)
    4647rm $FILELIST
Note: See TracChangeset for help on using the changeset viewer.