Added support for unzipping archives onto the Haiku image. The new rule

to do that is UnzipArchiveToHaikuImage. Cf. UserBuildConfig.sample for
a usage example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-09-04 21:50:00 +00:00
parent 5e1d6fb269
commit 0d469404ed
4 changed files with 102 additions and 1 deletions
+25
View File
@@ -18,6 +18,7 @@
# makebootable
# resattr
# rc
# unzip
#
if [ $# -gt 0 ]; then
. $1
@@ -53,6 +54,30 @@ else
mkindex=mkindex
fi
unzipFile()
{
# unzipFile <archive> <directory>
zipFile=$1
targetUnzipDir=$2
echo "Unzipping $zipFile ..."
if [ $isImage ]; then
unzipDir=$tmpDir/unzip
rm -rf $unzipDir
mkdir -p $unzipDir
$unzip -q -d $unzipDir $zipFile
$cp -r ${sPrefix}$unzipDir/. ${tPrefix}$targetUnzipDir
rm -rf $unzipDir
else
$unzip -q -d ${tPrefix}$targetUnzipDir ${sPrefix}$zipFile
fi
}
# create the image and mount it
if [ $isImage ]; then
echo