summaryrefslogtreecommitdiff
path: root/helpers/lh_source_hdd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:47 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:28 +0100
commit677415f6d7efc1e5b888570d70af311d2900c69c (patch)
tree32fe7ced768666c229fff913fe12cbbf2fdd34e4 /helpers/lh_source_hdd
parent811ff0532fcb3305ebefcd1d61e4eb6c260902eb (diff)
downloadlive-build-677415f6d7efc1e5b888570d70af311d2900c69c.zip
live-build-677415f6d7efc1e5b888570d70af311d2900c69c.tar.gz
Adding live-helper 1.0~a2-1.
Diffstat (limited to 'helpers/lh_source_hdd')
-rwxr-xr-xhelpers/lh_source_hdd51
1 files changed, 51 insertions, 0 deletions
diff --git a/helpers/lh_source_hdd b/helpers/lh_source_hdd
new file mode 100755
index 0000000..93eaa7f
--- /dev/null
+++ b/helpers/lh_source_hdd
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# lh_source_hdd(1) - build source harddisk image
+
+set -e
+
+# Source common functions
+for FUNCTION in /usr/share/live-helper/functions/*.sh
+do
+ . ${FUNCTION}
+done
+
+# Reading configuration files
+Read_conffile config/common
+Read_conffile config/image
+Set_defaults
+
+if [ "${LIVE_SOURCE}" = "disabled" ]
+then
+ exit 0
+fi
+
+for IMAGE in ${LIVE_SOURCE_IMAGE}
+do
+ if [ "${IMAGE}" = "hdd" ]
+ then
+ # Requiring stage file
+ Require_stagefile .stage/source_download
+
+ # Checking lock file
+ Check_lockfile .lock
+
+ # Creating lock file
+ Create_lockfile .lock
+
+ # Checking stage file
+ Check_stagefile .stage/source_hdd
+
+ # Remove old source
+ if [ -f source-hdd.tar.gz ]
+ then
+ rm -f source-hdd.tar.gz
+ fi
+
+ # Create tarball
+ tar cfz source-hdd.tar.gz source
+
+ # Creating stage file
+ Create_stagefile .stage/source_hdd
+ fi
+done