mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 10:47:14 +01:00
Workaround that fixes MIME DB problems under Linux, at least when
building an image from the scratch (with empty attributes and objects dirs). This closes bugs 194 and 253. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17364 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2fd148f926
commit
cf0b5d2551
@ -80,6 +80,11 @@ echo "Deleting old MIME database ..."
|
||||
$rm -rf $mimeDBDest
|
||||
$mkdir -p $mimeDBDest
|
||||
mkdir -p $tmpDir
|
||||
mimeTmpDir=$tmpDir/mime
|
||||
mimeTmpIndex=0
|
||||
|
||||
# create tmp dir for the MIME conversion stuff
|
||||
mkdir -p $mimeTmpDir
|
||||
|
||||
echo "Installing MIME database ..."
|
||||
|
||||
@ -88,13 +93,13 @@ for inSuperFile in $mimeDBSource/*.super; do
|
||||
outSuperDir=$mimeDBDest/$superType
|
||||
|
||||
# compile rdef to rsrc file and the rsrc file to attributes
|
||||
tmpFile=$tmpDir/mimedb$$.rsrc
|
||||
tmpFile2=$tmpDir/mimedb$$.mime
|
||||
mimeTmpIndex=$[$mimeTmpIndex + 1]
|
||||
tmpFile=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.rsrc
|
||||
tmpFile2=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.mime
|
||||
$rc -o $tmpFile $inSuperFile
|
||||
mkdir -p $tmpFile2
|
||||
$resattr -O -o $tmpFile2 $tmpFile
|
||||
$cp -r ${sPrefix}$tmpFile2 $outSuperDir
|
||||
rm -rf $tmpFile $tmpFile2
|
||||
|
||||
# iterate through the sub types
|
||||
for inSubFile in $mimeDBSource/$superType/*; do
|
||||
@ -104,16 +109,18 @@ for inSuperFile in $mimeDBSource/*.super; do
|
||||
outSubFile=$outSuperDir/$subType
|
||||
|
||||
# compile rdef to rsrc file and the rsrc file to attributes
|
||||
tmpFile=$tmpDir/mimedb$$.rsrc
|
||||
tmpFile2=$tmpDir/mimedb$$.mime
|
||||
mimeTmpIndex=$[$mimeTmpIndex + 1]
|
||||
tmpFile=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.rsrc
|
||||
tmpFile2=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.mime
|
||||
$rc -o $tmpFile $inSubFile
|
||||
$resattr -O -o $tmpFile2 $tmpFile
|
||||
$cp ${sPrefix}$tmpFile2 $outSubFile
|
||||
rm -f $tmpFile $tmpFile2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# cleanup tmp dir
|
||||
rm -rf $mimeTmpDir
|
||||
|
||||
# unmount
|
||||
if [ $isImage ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user