2005-10-29 20:27:43 +04:00
|
|
|
#!/bin/sh
|
2010-01-19 05:39:03 +03:00
|
|
|
set -o errexit
|
2005-10-29 20:27:43 +04:00
|
|
|
|
2007-04-07 01:13:35 +04:00
|
|
|
# The first argument is the shell script that initializes the variables:
|
2005-10-29 20:27:43 +04:00
|
|
|
# sourceDir
|
|
|
|
# outputDir
|
|
|
|
# tmpDir
|
2010-04-11 03:14:42 +04:00
|
|
|
# addBuildCompatibilityLibDir
|
2020-04-20 00:53:10 +03:00
|
|
|
# systemPackages - lists of the hpkg packages copied/updated into /system/packages
|
|
|
|
# otherPackages - lists of the hpkg packages copied/updated into other (optional) places
|
2016-12-10 14:51:50 +03:00
|
|
|
# repositories - all repository files
|
2013-07-05 12:51:42 +04:00
|
|
|
# downloadDir
|
2010-04-11 03:14:42 +04:00
|
|
|
# The following are only for image types:
|
2005-10-29 20:27:43 +04:00
|
|
|
# installDir
|
|
|
|
# isImage
|
|
|
|
# imagePath
|
|
|
|
# imageSize
|
2008-09-19 21:32:57 +04:00
|
|
|
# imageLabel
|
2013-07-05 12:51:42 +04:00
|
|
|
# resolvePackageDependencies
|
2014-05-01 21:42:36 +04:00
|
|
|
# noDownloads
|
2013-10-06 00:28:59 +04:00
|
|
|
# updateAllPackages
|
2007-04-07 01:13:35 +04:00
|
|
|
# updateOnly
|
2007-10-01 21:27:13 +04:00
|
|
|
# dontClearImage
|
2008-02-17 16:54:32 +03:00
|
|
|
# isVMwareImage
|
2008-08-18 12:39:46 +04:00
|
|
|
#
|
2008-04-19 19:55:54 +04:00
|
|
|
# addattr
|
2005-10-29 20:27:43 +04:00
|
|
|
# copyattr
|
2013-07-05 12:51:42 +04:00
|
|
|
# getPackageDependencies
|
2013-04-29 21:38:29 +04:00
|
|
|
# package
|
2005-10-29 20:27:43 +04:00
|
|
|
# rc
|
* 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
2008-03-23 00:05:03 +03:00
|
|
|
# rmAttrs
|
2007-09-05 01:50:00 +04:00
|
|
|
# unzip
|
2010-04-11 03:14:42 +04:00
|
|
|
# The following are only for image types:
|
|
|
|
# bfsShell
|
|
|
|
# fsShellCommand
|
|
|
|
# makebootable
|
|
|
|
# resattr
|
2008-04-04 01:18:18 +04:00
|
|
|
# vmdkimage
|
2010-04-11 03:14:42 +04:00
|
|
|
# The following is only for cd types:
|
|
|
|
# generate_attribute_stores
|
|
|
|
# isCD
|
2005-10-29 20:27:43 +04:00
|
|
|
#
|
|
|
|
if [ $# -gt 0 ]; then
|
|
|
|
. $1
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2010-04-11 03:14:42 +04:00
|
|
|
if [ ! $isCD ]; then
|
|
|
|
# If the haiku image path is a symlink resolve it now (makebootable needs the
|
|
|
|
# path of the actual device path under Linux).
|
|
|
|
normalizedImagePath=''
|
|
|
|
if readlink -f "$imagePath" > /dev/null 2>&1 ; then
|
|
|
|
normalizedImagePath=$(readlink -f "$imagePath")
|
2010-04-20 07:36:06 +04:00
|
|
|
elif realpath "$imagePath" > /dev/null 2>&1 ; then
|
2010-04-28 00:14:18 +04:00
|
|
|
normalizedImagePath=$(realpath "$imagePath")
|
2010-04-11 03:14:42 +04:00
|
|
|
elif greadlink -f "$imagePath" > /dev/null 2>&1 ; then
|
|
|
|
normalizedImagePath=$(greadlink -f "$imagePath")
|
|
|
|
fi
|
|
|
|
if [ -n "$normalizedImagePath" ]; then
|
|
|
|
imagePath="$normalizedImagePath"
|
|
|
|
fi
|
2008-06-18 17:02:41 +04:00
|
|
|
fi
|
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# this adds the build library dir to LD_LIBRARY_PATH
|
|
|
|
eval "$addBuildCompatibilityLibDir"
|
|
|
|
|
|
|
|
# map the shell commands
|
2010-04-11 03:14:42 +04:00
|
|
|
if [ $isCD ]; then
|
|
|
|
outputDir=$tmpDir/cdsource
|
|
|
|
|
|
|
|
sPrefix=
|
|
|
|
tPrefix="$outputDir/"
|
|
|
|
cd=cd
|
|
|
|
scd=:
|
|
|
|
cp="$copyattr -d"
|
|
|
|
copyAttrs="$copyattr"
|
|
|
|
ln=ln
|
|
|
|
mkdir=mkdir
|
|
|
|
rm=rm
|
2020-05-24 12:30:55 +03:00
|
|
|
mkindex="mkindex -d $tPrefix"
|
2010-04-11 03:14:42 +04:00
|
|
|
elif [ $isImage ]; then
|
2011-01-04 04:06:56 +03:00
|
|
|
# If FIFOs are used for the communication with the FS shell, prepare them.
|
|
|
|
if $fsShellCommand --uses-fifos; then
|
|
|
|
fifoBasePath=/tmp/build_haiku_image-$$-fifo
|
|
|
|
toFSShellFifo=${fifoBasePath}-to-shell
|
|
|
|
fromFSShellFifo=${fifoBasePath}-from-shell
|
|
|
|
|
|
|
|
rm -f $toFSShellFifo $fromFSShellFifo
|
|
|
|
mkfifo $toFSShellFifo $fromFSShellFifo
|
|
|
|
|
|
|
|
# Open the FIFOs such that they are ready for the fsShellCommand. This
|
|
|
|
# also makes sure that they remain open until this script exits. When we
|
|
|
|
# exit while the FS shell is still running and waiting for commands,
|
2011-01-04 04:39:30 +03:00
|
|
|
# closing of our file descriptors will break the FIFOs and the FS shell
|
2011-01-04 04:06:56 +03:00
|
|
|
# will exit, too.
|
2011-01-04 04:39:30 +03:00
|
|
|
# Note: A bit of trickery is needed since opening one end blocks until
|
|
|
|
# someone opens the other end.
|
|
|
|
sleep 3<$fromFSShellFifo 1 &
|
|
|
|
exec 6>$fromFSShellFifo 3<$fromFSShellFifo
|
|
|
|
sleep 5<$toFSShellFifo 1 &
|
|
|
|
exec 4>$toFSShellFifo 5<$toFSShellFifo
|
2011-01-04 04:06:56 +03:00
|
|
|
|
|
|
|
# Remove the FIFO files again -- we have the open FDs, so they can
|
|
|
|
# still be used and this makes sure they won't hang around any further.
|
|
|
|
rm -f $toFSShellFifo $fromFSShellFifo
|
|
|
|
|
|
|
|
# Remap the fsShellCommand and bfsShell such that they don't inherit the
|
|
|
|
# wrong FDs. For both fsShellCommand and bfsShell FD 3 is the input from
|
|
|
|
# the respectively other program, FD 4 is the output to it.
|
|
|
|
actualFSShellCommand="$fsShellCommand"
|
|
|
|
actualBFSShell="$bfsShell"
|
|
|
|
|
|
|
|
fsShellCommandWrapper()
|
|
|
|
{
|
|
|
|
$actualFSShellCommand 5>&- 6>&- "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
bfsShellWrapper()
|
|
|
|
{
|
|
|
|
$actualBFSShell 3>&5 4<&6 "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
fsShellCommand=fsShellCommandWrapper
|
|
|
|
bfsShell=bfsShellWrapper
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set up the other commands
|
2005-10-29 20:27:43 +04:00
|
|
|
sPrefix=:
|
|
|
|
tPrefix=/myfs/
|
|
|
|
cd="$fsShellCommand cd"
|
|
|
|
scd="$fsShellCommand cd"
|
2008-08-18 12:39:46 +04:00
|
|
|
cp="$fsShellCommand cp -f"
|
2007-07-27 03:20:58 +04:00
|
|
|
copyAttrs="$fsShellCommand cp -a"
|
2005-10-29 20:27:43 +04:00
|
|
|
ln="$fsShellCommand ln"
|
|
|
|
mkdir="$fsShellCommand mkdir"
|
|
|
|
rm="$fsShellCommand rm"
|
|
|
|
mkindex="$fsShellCommand mkindex"
|
|
|
|
else
|
|
|
|
sPrefix=
|
|
|
|
# TODO: This should come from the environment.
|
|
|
|
tPrefix="$installDir/"
|
|
|
|
cd=cd
|
|
|
|
scd=:
|
|
|
|
cp="$copyattr -d"
|
2007-07-27 03:20:58 +04:00
|
|
|
copyAttrs="$copyattr"
|
2005-10-29 20:27:43 +04:00
|
|
|
ln=ln
|
|
|
|
mkdir=mkdir
|
|
|
|
rm=rm
|
2020-05-24 12:30:55 +03:00
|
|
|
mkindex="mkindex -d $tPrefix"
|
2005-10-29 20:27:43 +04:00
|
|
|
fi
|
|
|
|
|
2010-04-25 01:32:17 +04:00
|
|
|
|
2013-08-13 17:31:22 +04:00
|
|
|
is_in_list()
|
|
|
|
{
|
|
|
|
local element
|
|
|
|
for element in $2; do
|
|
|
|
if [ "$1" = "$element" ]; then
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-27 20:48:12 +03:00
|
|
|
extractFile()
|
2007-09-05 01:50:00 +04:00
|
|
|
{
|
2013-08-01 10:53:06 +04:00
|
|
|
# extractFile <archive> <directory> <extractedSubDir>
|
2010-02-27 20:48:12 +03:00
|
|
|
archiveFile=$1
|
|
|
|
targetExtractedDir=$2
|
2010-02-27 21:15:47 +03:00
|
|
|
extractedSubDir=$3
|
2010-02-27 20:48:12 +03:00
|
|
|
|
|
|
|
extractDir=$tmpDir/extract
|
|
|
|
$rmAttrs -rf "$extractDir"
|
|
|
|
mkdir -p "$extractDir"
|
2010-04-24 23:52:36 +04:00
|
|
|
|
2010-02-27 20:48:12 +03:00
|
|
|
case "$archiveFile" in
|
|
|
|
*.zip)
|
2011-06-16 11:00:06 +04:00
|
|
|
echo "Extracting $archiveFile ..."
|
2010-02-27 20:48:12 +03:00
|
|
|
$unzip -q -d "$extractDir" "$archiveFile"
|
|
|
|
;;
|
|
|
|
*.tgz|*.tar.gz)
|
2011-06-16 11:00:06 +04:00
|
|
|
echo "Extracting $archiveFile ..."
|
2010-02-27 20:48:12 +03:00
|
|
|
tar -C "$extractDir" -xf "$archiveFile"
|
|
|
|
;;
|
2011-06-16 11:00:06 +04:00
|
|
|
*.hpkg)
|
2013-04-29 21:38:29 +04:00
|
|
|
echo "Extracting $archiveFile ..."
|
|
|
|
if [ -n "$extractedSubDir" ]; then
|
|
|
|
$package extract -C "$extractDir" "$archiveFile" \
|
|
|
|
"$extractedSubDir"
|
|
|
|
else
|
|
|
|
$package extract -C "$extractDir" "$archiveFile"
|
|
|
|
fi
|
2011-06-16 11:00:06 +04:00
|
|
|
;;
|
2010-02-27 20:48:12 +03:00
|
|
|
*)
|
2013-04-29 21:38:29 +04:00
|
|
|
echo "Unhandled archive extension in build_haiku_image" \
|
|
|
|
"extractFile()"
|
2010-02-27 20:48:12 +03:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2010-04-24 23:52:36 +04:00
|
|
|
|
2010-02-27 20:48:12 +03:00
|
|
|
if [ -f $extractDir/.OptionalPackageDescription ]; then
|
|
|
|
cat $extractDir/.OptionalPackageDescription >> $copyrightsFile
|
2008-04-19 19:55:54 +04:00
|
|
|
echo >> $copyrightsFile
|
2010-02-27 20:48:12 +03:00
|
|
|
rm $extractDir/.OptionalPackageDescription
|
2007-09-05 01:50:00 +04:00
|
|
|
fi
|
2008-04-19 19:55:54 +04:00
|
|
|
|
2013-04-29 21:38:29 +04:00
|
|
|
$cp -r "${sPrefix}$extractDir/$extractedSubDir/." \
|
|
|
|
"${tPrefix}$targetExtractedDir"
|
2008-04-19 19:55:54 +04:00
|
|
|
|
2010-02-27 20:48:12 +03:00
|
|
|
$rmAttrs -rf "$extractDir"
|
2007-09-05 01:50:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-07-05 12:51:42 +04:00
|
|
|
downloadFile()
|
|
|
|
{
|
|
|
|
url=$1
|
|
|
|
path=$2
|
|
|
|
|
|
|
|
if [ ! -f "$path" ]; then
|
2014-05-26 01:45:22 +04:00
|
|
|
if [ "$noDownloads" = "1" ]; then
|
2014-05-01 21:42:36 +04:00
|
|
|
echo "ERROR: Would need to download $url, but HAIKU_NO_DOWNLOADS "
|
|
|
|
"is set!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-07-05 12:51:42 +04:00
|
|
|
wget -O "$path" "$url"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-10-09 05:47:28 +04:00
|
|
|
packageFileName()
|
|
|
|
{
|
|
|
|
$package info -f "%fileName%" "$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-19 19:55:54 +04:00
|
|
|
mkdir -p $tmpDir
|
|
|
|
copyrightsFile=$tmpDir/copyrights
|
|
|
|
$rmAttrs -f $copyrightsFile
|
|
|
|
|
2010-04-11 03:14:42 +04:00
|
|
|
if [ $isCD ]; then
|
|
|
|
# setup output dir
|
|
|
|
$rmAttrs -rf "$outputDir"
|
|
|
|
mkdir -p "$outputDir"
|
2010-04-28 00:14:18 +04:00
|
|
|
fi
|
2008-04-19 19:55:54 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# create the image and mount it
|
|
|
|
if [ $isImage ]; then
|
|
|
|
echo
|
2008-02-17 16:54:32 +03:00
|
|
|
|
|
|
|
imageOffsetFlags=
|
|
|
|
if [ $isVMwareImage ]; then
|
|
|
|
imageOffsetFlags="--start-offset 65536"
|
|
|
|
fi
|
|
|
|
|
2007-04-07 01:13:35 +04:00
|
|
|
if [ ! $updateOnly ]; then
|
|
|
|
echo "Creating image ..."
|
2008-02-17 16:54:32 +03:00
|
|
|
|
2009-04-12 13:18:18 +04:00
|
|
|
imageFlags="-i${imageSize}M"
|
|
|
|
if [ ! "$dontClearImage" ]; then
|
|
|
|
imageFlags="$imageFlags -c"
|
|
|
|
fi
|
|
|
|
|
2008-02-17 16:54:32 +03:00
|
|
|
if [ $isVMwareImage ]; then
|
2010-01-19 05:39:03 +03:00
|
|
|
$vmdkimage -h 64k $imageFlags "$imagePath"
|
2009-04-12 13:18:18 +04:00
|
|
|
else
|
2010-01-19 05:39:03 +03:00
|
|
|
$createImage $imageFlags "$imagePath"
|
2008-02-17 16:54:32 +03:00
|
|
|
fi
|
|
|
|
|
2008-09-19 21:32:57 +04:00
|
|
|
$bfsShell --initialize $imageOffsetFlags "$imagePath" \
|
2010-01-19 05:39:03 +03:00
|
|
|
"$imageLabel" "block_size 2048"
|
2008-03-28 00:11:04 +03:00
|
|
|
$makebootable $imageOffsetFlags "$imagePath"
|
2007-04-07 01:13:35 +04:00
|
|
|
fi
|
2011-01-04 04:06:56 +03:00
|
|
|
|
2008-03-28 00:11:04 +03:00
|
|
|
$bfsShell -n $imageOffsetFlags "$imagePath" > /dev/null &
|
2005-10-29 20:27:43 +04:00
|
|
|
sleep 1
|
2011-01-04 04:06:56 +03:00
|
|
|
|
|
|
|
# Close FDs 5 and 6. Those represent the pipe ends that are used by the
|
|
|
|
# FS shell. Closing them in the shell process makes sure an unexpected death
|
|
|
|
# of the FS shell causes writing to/reading from the other ends to fail
|
|
|
|
# immediately.
|
|
|
|
exec 5>&- 6>&-
|
|
|
|
|
2008-03-09 20:34:26 +03:00
|
|
|
# bail out, if mounting fails
|
2010-01-19 05:39:03 +03:00
|
|
|
$cd .
|
2005-10-29 20:27:43 +04:00
|
|
|
fi
|
|
|
|
|
2013-10-06 00:28:59 +04:00
|
|
|
|
|
|
|
# Clean out the old packages directory, if updating all packages.
|
|
|
|
if [ -n "$updateAllPackages" ]; then
|
|
|
|
echo "Removing old packages ..."
|
|
|
|
$rm -rf "${tPrefix}system/packages"
|
|
|
|
$mkdir -p "${tPrefix}system/packages"
|
|
|
|
fi
|
|
|
|
|
2020-07-22 18:48:32 +03:00
|
|
|
if [ ! $updateOnly ] && [ ! $isCD ]; then
|
2020-05-24 12:30:55 +03:00
|
|
|
echo "Creating filesystem indices..."
|
2020-07-21 19:36:18 +03:00
|
|
|
$mkindex -t string Audio:Album
|
|
|
|
$mkindex -t string Audio:Artist
|
|
|
|
$mkindex -t string Media:Genre
|
|
|
|
$mkindex -t string Media:Title
|
|
|
|
$mkindex -t string MAIL:account
|
|
|
|
$mkindex -t string MAIL:cc
|
|
|
|
$mkindex -t string MAIL:chain
|
|
|
|
$mkindex -t string MAIL:from
|
|
|
|
$mkindex -t string MAIL:name
|
|
|
|
$mkindex -t string MAIL:pending_chain
|
|
|
|
$mkindex -t string MAIL:priority
|
|
|
|
$mkindex -t string MAIL:reply
|
|
|
|
$mkindex -t string MAIL:status
|
|
|
|
$mkindex -t string MAIL:subject
|
|
|
|
$mkindex -t string MAIL:thread
|
|
|
|
$mkindex -t string MAIL:to
|
|
|
|
$mkindex -t string META:address
|
|
|
|
$mkindex -t string META:city
|
|
|
|
$mkindex -t string META:company
|
|
|
|
$mkindex -t string META:county
|
|
|
|
$mkindex -t string META:email
|
|
|
|
$mkindex -t string META:fax
|
|
|
|
$mkindex -t string META:group
|
|
|
|
$mkindex -t string META:hphone
|
|
|
|
$mkindex -t string META:name
|
|
|
|
$mkindex -t string META:nickname
|
|
|
|
$mkindex -t string META:state
|
|
|
|
$mkindex -t string META:url
|
|
|
|
$mkindex -t string META:wphone
|
|
|
|
$mkindex -t string META:zip
|
|
|
|
|
|
|
|
$mkindex -t int32 Media:Rating
|
|
|
|
$mkindex -t int32 Media:Year
|
|
|
|
$mkindex -t int32 MAIL:account_id
|
|
|
|
$mkindex -t int32 MAIL:read
|
|
|
|
$mkindex -t int32 MAIL:when
|
2023-08-25 21:53:50 +03:00
|
|
|
$mkindex -t int32 MAIL:draft
|
|
|
|
$mkindex -t int32 MAIL:flags
|
2020-07-21 19:36:18 +03:00
|
|
|
fi
|
2013-10-06 00:28:59 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
echo "Populating image ..."
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
. $1
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2013-07-05 12:51:42 +04:00
|
|
|
# resolve package dependencies
|
|
|
|
if [ -n "$resolvePackageDependencies" ]; then
|
|
|
|
echo "Resolving package dependencies ..."
|
|
|
|
|
2013-07-06 04:29:51 +04:00
|
|
|
packageUrls=`$getPackageDependencies $repositories -- $systemPackages`
|
2013-07-05 12:51:42 +04:00
|
|
|
for packageUrl in $packageUrls; do
|
|
|
|
packageFileName=`basename $packageUrl`
|
2020-04-20 00:53:10 +03:00
|
|
|
if [ "$otherPackages" != "${otherPackages#*$packageFileName}" ]; then
|
|
|
|
echo "ERROR: $packageFileName is a dependency of a package installed in /system/packages," \
|
|
|
|
"but it is in another (i.e. unactivated) package directory!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-07-05 12:51:42 +04:00
|
|
|
packageFilePath="$downloadDir/$packageFileName"
|
|
|
|
downloadFile $packageUrl "$packageFilePath"
|
|
|
|
$cp "${sPrefix}$packageFilePath" "${tPrefix}system/packages"
|
|
|
|
systemPackages="$systemPackages $packageFilePath"
|
|
|
|
done
|
|
|
|
|
2020-04-20 00:53:10 +03:00
|
|
|
# validate dependencies of optional packages
|
|
|
|
packageUrls=`$getPackageDependencies $repositories -- $systemPackages $otherPackages`
|
|
|
|
packageFileNames=""
|
|
|
|
for packageUrl in $packageUrls; do
|
|
|
|
packageFileNames="$packageFileNames `basename $packageUrl`"
|
|
|
|
done
|
|
|
|
if [ ! -z "$packageFileNames" ]; then
|
|
|
|
echo "ERROR: Some of the unactivated (i.e. optional) packages have the following unmet dependencies:"
|
|
|
|
echo $packageFileNames
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2013-07-05 12:51:42 +04:00
|
|
|
|
2013-04-29 21:38:29 +04:00
|
|
|
# install default settings for packages
|
2013-09-30 00:09:00 +04:00
|
|
|
for packageFile in $systemPackages; do
|
2022-10-06 16:52:58 +03:00
|
|
|
if $package list -p $packageFile | grep -E '^settings/' > /dev/null; then
|
2013-09-30 00:09:00 +04:00
|
|
|
extractFile $packageFile system/settings settings
|
2013-04-29 21:38:29 +04:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2010-04-11 03:14:42 +04:00
|
|
|
if [ $isCD ]; then
|
|
|
|
# generate the attribute stores
|
|
|
|
echo "Generating attribute stores ..."
|
|
|
|
$generate_attribute_stores "$tPrefix"
|
|
|
|
|
|
|
|
echo "Copying boot image ..."
|
|
|
|
$cp "$cdBootFloppy" "$outputDir"
|
|
|
|
|
2019-01-09 03:31:15 +03:00
|
|
|
if [ $(which xorriso) ]; then
|
|
|
|
# build the iso image using xorriso
|
|
|
|
echo "Building CD image..."
|
|
|
|
xorriso -as mkisofs -r -b `basename $cdBootFloppy` \
|
|
|
|
-V "$cdLabel" -o "$cdImagePath" "$tPrefix"
|
2011-05-25 06:13:13 +04:00
|
|
|
else
|
2019-01-09 03:31:15 +03:00
|
|
|
echo "you need xorriso to create a CD image."
|
2011-05-25 06:13:13 +04:00
|
|
|
exit 1
|
|
|
|
fi
|
2010-04-11 03:14:42 +04:00
|
|
|
|
|
|
|
# cleanup output dir
|
|
|
|
$rmAttrs -rf "$outputDir"
|
|
|
|
fi
|
2008-04-19 19:55:54 +04:00
|
|
|
|
2005-10-29 20:27:43 +04:00
|
|
|
# unmount
|
|
|
|
if [ $isImage ]; then
|
|
|
|
echo "Unmounting ..."
|
|
|
|
$fsShellCommand sync
|
|
|
|
$fsShellCommand quit
|
|
|
|
fi
|