mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 18:56:49 +01:00
Added `-i <include file>' option. If specified, the file is included
(sourced) before unmounting the image. That solve my problem that mounting and copying things onto the image after makehdimage is done, damages the FS integrity for any reason (Axel can't reproduce it, of course :-). Maybe others have the same problem. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11744 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5a072ced75
commit
8a9c34bcfb
25
makehdimage
25
makehdimage
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage: makehdimage [image path/target dir]
|
||||
# Usage: makehdimage [-i includeFile] [image path/target dir]
|
||||
#
|
||||
# This script will compile all files needed to create a bootable Haiku image,
|
||||
# create such an image, and copy the files to the correct location.
|
||||
@ -12,6 +12,9 @@
|
||||
# If you specify a target directory, no image is going to be created at
|
||||
# all.
|
||||
#
|
||||
# If you pass `-i includeFile', the file is sourced before unmounting the
|
||||
# image.
|
||||
#
|
||||
# The image is populated using the bfs_shell which is created from the sources.
|
||||
# The bfs_shell emulates a mini-kernel evironment with a mounted BFS. The
|
||||
# program fs_shell_command is used to deliver commands to it. Due to this
|
||||
@ -41,6 +44,21 @@
|
||||
sourceDir=.
|
||||
alreadyMounted=
|
||||
targetDir=/haiku
|
||||
includeFile=
|
||||
|
||||
# check whether there's a file to be included
|
||||
if [ $# \> 0 ]; then
|
||||
if [ "$1" = "-i" ]; then
|
||||
shift
|
||||
if [ $# \> 0 ]; then
|
||||
includeFile="$1"
|
||||
shift
|
||||
else
|
||||
echo "Error: Option \`-i' requires a parameter!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# disk image path, size in MB
|
||||
if [ -d "$1" ]; then
|
||||
@ -385,6 +403,11 @@ for inSuperFile in $mimeDBSource/*.super; do
|
||||
done
|
||||
|
||||
|
||||
# source the include file, if any
|
||||
if [ "$includeFile" != "" ]; then
|
||||
. $includeFile
|
||||
fi
|
||||
|
||||
cd $previousDir
|
||||
sync
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user