live-build/helpers/lh_binary_hdd

65 lines
1.2 KiB
Plaintext
Raw Normal View History

2007-09-23 08:04:47 +00:00
#!/bin/sh
# lh_binary_hdd(1) - build harddisk binary image
2007-09-23 08:04:48 +00:00
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
2007-09-23 08:04:47 +00:00
set -e
# Source common functions
for FUNCTION in /usr/share/live-helper/functions/*.sh
do
. ${FUNCTION}
done
2007-09-23 08:04:48 +00:00
# Set static variables
DESCRIPTION="build harddisk binary image"
HELP=""
USAGE="${PROGRAM} [--force]"
Arguments "${@}"
2007-09-23 08:04:49 +00:00
Echo_debug "Init ${PROGRAM}"
2007-09-23 08:04:47 +00:00
# Reading configuration files
Read_conffile config/bootstrap
2007-09-23 08:04:49 +00:00
Read_conffile config/chroot
Read_conffile config/common
2007-09-23 08:04:47 +00:00
Read_conffile config/image
Set_defaults
2007-09-23 08:04:49 +00:00
2007-09-23 08:04:47 +00:00
for IMAGE in ${LIVE_BINARY_IMAGE}
do
if [ "${IMAGE}" = "hdd" ]
then
2007-09-23 08:04:49 +00:00
Breakpoint "binary_hdd: Init"
2007-09-23 08:04:48 +00:00
# Requiring stage file
Require_stagefile .stage/bootstrap
2007-09-23 08:04:50 +00:00
# Checking stage file
Check_stagefile .stage/binary_hdd
2007-09-23 08:04:48 +00:00
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
2007-09-23 08:04:47 +00:00
# Remove old binary
if [ -f binary-hdd.tar.gz ]
then
rm -f binary-hdd.tar.gz
fi
tar cfz binary-hdd.tar.gz binary
# Creating stage file
Create_stagefile .stage/binary_hdd
fi
done