diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-05-11 19:57:04 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-06-14 13:36:07 +0200 |
commit | 3686fb8c8e81bac36c52f6bfac75758e30497dea (patch) | |
tree | 944690944f1324a61ae2436aa39cebc5e75e950d /scripts | |
parent | 5a1cbb7c9daf1395e6cfcd3181a323e2c060465b (diff) | |
download | ptxdist-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.sh | 28 |
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 |