* BuildPlatformMain supports overriding HOST_LIBROOT on the target now,
so one can set it to the static libroot, if desired.
* Generic attribute emulation:
- Added build tool rm_attrs, a simple "rm" replacement, which also
removes the attributes directory for a given file.
- Added build/scripts/rm_attrs shell script, which wraps the
invocation of the rm_attrs tool. If it doesn't exist yet, the
ordinary rm is used.
- The RM jam variable refers to the rm_attrs script now, i.e. whenever
something is removed by the build system, the attributes are removed
too (if the build tool has already been built, that is).
- Removed the shell function attrrmrf() in build_haiku_image. We use
the rm_attrs tool instead, if necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24528 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
# makebootable
|
||||
# resattr
|
||||
# rc
|
||||
# rmAttrs
|
||||
# unzip
|
||||
# vmdkheader
|
||||
#
|
||||
@@ -59,20 +60,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# attribute-safe rm -rf
|
||||
# This makes sure there are no leftover attribute file before removing each file
|
||||
attrrmrf()
|
||||
{
|
||||
test -e "$1" || return
|
||||
if [ -d "$outputDir/attributes" ]; then
|
||||
# test for gnu stat, else fallback to the bsd one.
|
||||
statFormatOpt="-c"
|
||||
stat -c '%i' . >/dev/null 2>&1 || statFormatOpt="-f"
|
||||
find "$1" -print0 | xargs -0 stat $statFormatOpt %i | awk "{ print \"$outputDir/attributes/\" \$1 }" | xargs rm -rf
|
||||
fi
|
||||
rm -rf "$1"
|
||||
}
|
||||
|
||||
unzipFile()
|
||||
{
|
||||
# unzipFile <archive> <directory>
|
||||
@@ -83,13 +70,13 @@ unzipFile()
|
||||
|
||||
if [ $isImage ]; then
|
||||
unzipDir=$tmpDir/unzip
|
||||
attrrmrf "$unzipDir"
|
||||
$rmAttrs -rf "$unzipDir"
|
||||
mkdir -p "$unzipDir"
|
||||
|
||||
$unzip -q -d "$unzipDir" "$zipFile"
|
||||
$cp -r "${sPrefix}$unzipDir/." "${tPrefix}$targetUnzipDir"
|
||||
|
||||
attrrmrf "$unzipDir"
|
||||
$rmAttrs -rf "$unzipDir"
|
||||
else
|
||||
$unzip -q -o -d "${tPrefix}$targetUnzipDir" "${sPrefix}$zipFile"
|
||||
fi
|
||||
@@ -192,7 +179,7 @@ if [ ! $updateOnly ]; then
|
||||
done
|
||||
|
||||
# cleanup tmp dir
|
||||
attrrmrf $mimeTmpDir
|
||||
$rmAttrs -rf $mimeTmpDir
|
||||
fi # ! updateOnly
|
||||
|
||||
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "$0: Usage:..."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
rmAttrs=$1
|
||||
shift
|
||||
|
||||
if [ -f $rmAttrs ]; then
|
||||
$rmAttrs $@
|
||||
else
|
||||
rm $@
|
||||
fi
|
||||
Reference in New Issue
Block a user