diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-01-20 15:44:25 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-01-20 15:47:18 +0000 |
commit | 5dd4778d66b5ac1acc7d42ef391c00b4d8dae408 (patch) | |
tree | 955c5dccdfd62cd7ed0e71b3b91693a1c8580cf5 /g | |
parent | 142a314a70931738bf49911d0e2d7bfdbf5494cb (diff) |
cope with change of path, and broken absolute links this generates
Diffstat (limited to 'g')
-rwxr-xr-x | g | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -234,12 +234,18 @@ for REPO in $DIRS ; do case "$COMMAND" in pull|clone) # update links - for link in $(ls) ; do - if [ ! -e "$RAWBUILDDIR/$link" ] ; then - echo "Creating missing link $link" - ln -s "$DIR/$link" "$RAWBUILDDIR/$link" - fi - done + if [ "$DIR" != "$RAWBUILDDIR" ]; then + for link in $(ls) ; do + if [ ! -e "$RAWBUILDDIR/$link" ] ; then + if test -h "$RAWBUILDDIR/$link"; then + rm "$RAWBUILDDIR/$link" + echo -n "re-" + fi + echo "creating missing link $link $DIR/$link -> $RAWBUILDDIR/$link" + ln -sf "$DIR/$link" "$RAWBUILDDIR/$link" + fi + done + fi ;; status) # git status returns error in some versions, clear that |