summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-05-11 19:57:04 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-06-14 13:36:07 +0200
commit3686fb8c8e81bac36c52f6bfac75758e30497dea (patch)
tree944690944f1324a61ae2436aa39cebc5e75e950d /scripts
parent5a1cbb7c9daf1395e6cfcd3181a323e2c060465b (diff)
downloadptxdist-3686fb8c8e81bac36c52f6bfac75758e30497dea.tar.gz
ptxdist-3686fb8c8e81bac36c52f6bfac75758e30497dea.tar.xz
ptxd_make_image_archive: new function to create tarball images
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_image_archive.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_image_archive.sh b/scripts/lib/ptxd_make_image_archive.sh
new file mode 100644
index 000000000..650679a2e
--- /dev/null
+++ b/scripts/lib/ptxd_make_image_archive.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+#
+# Copyright (C) 2012 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# extract ipkg an generate a tgz image
+#
+ptxd_make_image_archive_impl() {
+ ptxd_make_image_init &&
+ ptxd_get_ipkg_files ${image_pkgs} &&
+ ptxd_make_image_extract_xpkg_files "${pkg_dir}" &&
+ cd "${pkg_dir}" &&
+ echo -e "\nCreating $(ptxd_print_path "${image_image}") ...\n" &&
+ tar -zcf "${image_image}" . &&
+ rm -r "${pkg_dir}"
+}
+export -f ptxd_make_image_archive_impl
+
+ptxd_make_image_archive() {
+ fakeroot ptxd_make_image_archive_impl
+}
+export -f ptxd_make_image_archive