Copying source directories to the image was broken, when building from
the root of the source tree. Added a work-around that should fix the problem. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23544 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -184,19 +184,29 @@ if [ -n "${sourceDirsToCopy}" ]; then
|
|||||||
$mkdir -p ${sourcesDest}
|
$mkdir -p ${sourcesDest}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# When building in the root of the source directory, sourceDir is "." and
|
||||||
|
# the source directory are not prefixed, which breaks the sed expressions
|
||||||
|
# used below. We work around, by adjusting the strings to match and insert.
|
||||||
|
sourcePathPrefix=$sourceDir
|
||||||
|
destPathPrefix=$sourcesDest
|
||||||
|
if [ $sourcePathPrefix = "." ]; then
|
||||||
|
sourcePathPrefix=""
|
||||||
|
destPathPrefix="${sourcesDest}/"
|
||||||
|
fi
|
||||||
|
|
||||||
for sourcesDir in ${sourceDirsToCopy}; do
|
for sourcesDir in ${sourceDirsToCopy}; do
|
||||||
echo " sources dir: ${sourcesDir}"
|
echo " sources dir: ${sourcesDir}"
|
||||||
|
|
||||||
# create all subdirectories
|
# create all subdirectories
|
||||||
subDirs=$(find ${sourcesDir} -type d | grep -v '.svn' |
|
subDirs=$(find ${sourcesDir} -type d | grep -v '.svn' |
|
||||||
sed -e "s@^${sourceDir}@${sourcesDest}@")
|
sed -e "s@^${sourcePathPrefix}@${destPathPrefix}@")
|
||||||
$mkdir -p ${subDirs}
|
$mkdir -p ${subDirs}
|
||||||
|
|
||||||
# get all files and copy each one individually
|
# get all files and copy each one individually
|
||||||
sourceFiles=$(find $sourcesDir -type f | grep -v '.svn')
|
sourceFiles=$(find $sourcesDir -type f | grep -v '.svn')
|
||||||
for sourceFile in $sourceFiles; do
|
for sourceFile in $sourceFiles; do
|
||||||
destSourceFile=$(echo $sourceFile |
|
destSourceFile=$(echo $sourceFile |
|
||||||
sed -e "s@^${sourceDir}@${sourcesDest}@")
|
sed -e "s@^${sourcePathPrefix}@${destPathPrefix}@")
|
||||||
$cp ${sPrefix}$sourceFile $destSourceFile
|
$cp ${sPrefix}$sourceFile $destSourceFile
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user