Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to fix the random "will not create hard link" errors on Win32…
…; this also turns out to be a win on other platforms for the source code copy case, where we don't want to copy the svn directories. r=mook git-svn-id: http://publicsvn.songbirdnest.com/vendor/trunk@10527 37441250-4157-47a9-a2c9-f9fe3212d2d3
- Loading branch information
preed
committed
Apr 16, 2009
1 parent
52aad17
commit 7d68461
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
# | ||
# This seems like a really stupid script, but it is a replacement for MSYS's | ||
# wonky and anemic "cp" command; on large recursive copies, it is common | ||
# to get errors about "will not create hard link `foo' to directory `bar'", | ||
# when foo and bar aren't even related. Mook gave the idea that using tar | ||
# for large copies like this is a workaround that proves to be reliable. | ||
# | ||
# It still makes me cry, though. | ||
# | ||
|
||
SRCDIR="$1" | ||
DESTDIR="$2" | ||
SRCTARARGS="$3" | ||
DESTTARARGS="$4" | ||
|
||
MKDIR=${MKDIR:=mkdir -p} | ||
TAR=${TAR:=tar} | ||
|
||
if test -z "$SRCDIR"; then | ||
echo Source directory missing | ||
echo $0 [source dir] [dest dir] [src tar cmd args] [dest tar cmd args] | ||
exit 1 | ||
fi | ||
|
||
if test -z "$DESTDIR"; then | ||
echo Destination directory missing | ||
echo $0 [source dir] [dest dir] [src tar cmd args] [dest tar cmd args] | ||
exit 1 | ||
fi | ||
|
||
if ! test -d "$DESTDIR"; then | ||
echo Creating $DESTDIR... | ||
$MKDIR "$DESTDIR" | ||
fi | ||
|
||
echo Running $TAR c $SRCTARARGS -C "$SRCDIR" . \| $TAR x $DESTTARARGS -C "$DESTDIR" | ||
$TAR c $SRCTARARGS -C "$SRCDIR" . | $TAR x $DESTTARARGS -C "$DESTDIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters