Information being provided as per the dialog box that popped up:

- meld version: 1.3.1
- source control software type: 'Subversion'
- source control software version: '1.6.11'
- output of 'svn diff rsync-files.sh' is attached
- patch command: 'patch --strip=0 --reverse --directory=/tmp/tmp3rbPP7-meld'

-- 

*Brian Davis | *Senior Software Engineer
* | ULLINK*

T: +1 646 565 6600 *| *M: +1 203 722 3608

11 Times Square, 31st fl. (corner 41st & 8th) *|* New York, NY 10036

*[email protected]* <[email protected]> *|* http://www.ullink.com

-- 
*The information contained in or attached to this email is strictly 
confidential. If you are not the intended recipient, please notify us 
immediately by telephone and return the message to us.*
Index: rsync-files.sh
===================================================================
--- rsync-files.sh      (revision 12146)
+++ rsync-files.sh      (working copy)
@@ -1,29 +1,48 @@
-#!/bin/bash -x
+#!/bin/bash -e
 
-function usage
-{
-   echo "ERROR: $*"
-   echo "usage: $0 <source directory> <target directory> <directory list file>"
+# Synchronizes the network /build/share => /local/build/share
+#
+# NOTE: the source MUST be mounted on /build, or rsync will throw errors 
related to broken links
+#
+# So, we need to fiddle with the local directories in order to get this to 
work.
+#
+# We assume that /build is a symlink to /local/build -- if so, we unlink it 
before mounting and then
+# relink it afterwards.
+#
+# For now, not bothering with permissions, so script must be run as root
+
+[[ $# -gt 0 ]] || { echo "Usage: $0 filename"; exit 1; }
+[[ -f $1 ]] || { echo "$1 is not a file"; exit 1; }
+DIR_LIST=$1
+
+#LOCAL_BUILD="/shared/build"              # Bill's machine
+LOCAL_BUILD=/local/build              # convention going forward
+
+# check that link points where we think it should
+if [[ ! "$(readlink -fn /build)" -ef "${LOCAL_BUILD}" ]]; then
+   echo "/build doesnt point to ${LOCAL_BUILD}!"
    exit 1
-}
+fi
 
-[[ $# -gt 2 ]] || usage
-[[ -d $1 ]] || usage "$1 is not a directory"
-[[ -f $3 ]] || usage "$3 is not a file"
+# mount remote as /build
+rm -f /build                                    # remove the link
+mkdir /build                                    # create directory to mount 
over
+mount -r 172.26.90.61:/vol/vol1/build /build    # mount netapp as /build
+#mount -o ro,noload 172.26.90.61:/vol/vol1/build /build    # mount netapp as 
/build
 
-SRC_PATH=$1
-TGT_PATH=$2
-DIR_LIST=$3
-
+# process the file
 for dir in $(egrep -v '^#|^\s*$' "${DIR_LIST}"); do
-   if [[ -d "${SRC_PATH}/${dir}" ]]; then
+   if [[ -d "/build/share/${dir}" ]]; then
       # if source is a directory, simply copy it recursively
-      mkdir -p "${TGT_PATH}/${dir}"
-      rsync -azh --delete "${SRC_PATH}/${dir}/" "${TGT_PATH}/${dir}/"
-   elif [[ -L "${SRC_PATH}/${dir}" ]]; then
-      # if the source is a symlink, the symlink must be transferred
-      link_target=$(dirname "${dir}")
-      mkdir -p "${TGT_PATH}/${link_target}"
-      rsync -a "${SRC_PATH}/${dir}" "${TGT_PATH}/${link_target}"
+      mkdir -p "${LOCAL_BUILD}/share/${dir}" || true
+      echo "Copying ${dir} ..."
+      rsync -azh --delete "/build/share/${dir}/" "${LOCAL_BUILD}/share/${dir}/"
+   else
+      echo "Cant find ${dir} on source ..."
    fi
 done
+
+# put the link back
+umount -f /build
+rmdir /build
+ln -s ${LOCAL_BUILD} /build
_______________________________________________
meld-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/meld-list

Reply via email to