Check if /bin/stat supports the gnuish -c option, else fallback to BSD syntax.
This should fix ticket #1676, please try. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24337 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -65,7 +65,10 @@ attrrmrf()
|
|||||||
{
|
{
|
||||||
test -e "$1" || return
|
test -e "$1" || return
|
||||||
if [ -d "$outputDir/attributes" ]; then
|
if [ -d "$outputDir/attributes" ]; then
|
||||||
find "$1" -print0 | xargs -0 stat -c %i | awk "{ print \"$outputDir/attributes/\" \$1 }" | xargs rm -rf
|
# 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
|
fi
|
||||||
rm -rf "$1"
|
rm -rf "$1"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user