summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-06-19 11:08:20 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-06-19 11:08:26 +0200
commitdd78ae59bbd622b16fa17720fbc5aed0ed39e78b (patch)
tree3eca49a88df0357fc47ca480a135c5e0af2f2ea4 /scripts
parent00f1fd6292c017de0a14fdc9d09bf2daa5f89d02 (diff)
downloadptxdist-dd78ae59bbd622b16fa17720fbc5aed0ed39e78b.tar.gz
ptxdist-dd78ae59bbd622b16fa17720fbc5aed0ed39e78b.tar.xz
ptxd_make_xpkg_finish: refactor
extract commen parts of the opkg/ipkg creation. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_ipkg_finish.sh15
-rw-r--r--scripts/lib/ptxd_make_opkg_finish.sh15
-rw-r--r--scripts/lib/ptxd_make_xpkg_finish.sh15
3 files changed, 14 insertions, 31 deletions
diff --git a/scripts/lib/ptxd_make_ipkg_finish.sh b/scripts/lib/ptxd_make_ipkg_finish.sh
index 2ef23e682..ab5f21c36 100644
--- a/scripts/lib/ptxd_make_ipkg_finish.sh
+++ b/scripts/lib/ptxd_make_ipkg_finish.sh
@@ -20,18 +20,3 @@ ptxd_make_ipkg_finish_impl() {
}
export -f ptxd_make_ipkg_finish_impl
-
-#
-# create an ipkg package
-#
-ptxd_make_ipkg_finish() {
- local -a fake_args
- if [ -f "${pkg_fake_env}" ]; then
- fake_args=( "-i" "${pkg_fake_env}" )
- fi
- fake_args[${#fake_args[@]}]="-u"
-
- export ${!pkg_*} ${!ptx_*}
- fakeroot "${fake_args[@]}" -- ptxd_make_ipkg_finish_impl
-}
-export -f ptxd_make_ipkg_finish
diff --git a/scripts/lib/ptxd_make_opkg_finish.sh b/scripts/lib/ptxd_make_opkg_finish.sh
index 583a5ef24..d303c6d15 100644
--- a/scripts/lib/ptxd_make_opkg_finish.sh
+++ b/scripts/lib/ptxd_make_opkg_finish.sh
@@ -20,18 +20,3 @@ ptxd_make_opkg_finish_impl() {
}
export -f ptxd_make_opkg_finish_impl
-
-#
-# create an opkg package
-#
-ptxd_make_opkg_finish() {
- local -a fake_args
- if [ -f "${pkg_fake_env}" ]; then
- fake_args=( "-i" "${pkg_fake_env}" )
- fi
- fake_args[${#fake_args[@]}]="-u"
-
- export ${!pkg_*} ${!ptx_*}
- fakeroot "${fake_args[@]}" -- ptxd_make_opkg_finish_impl
-}
-export -f ptxd_make_opkg_finish
diff --git a/scripts/lib/ptxd_make_xpkg_finish.sh b/scripts/lib/ptxd_make_xpkg_finish.sh
index 9de4c15fd..cf1e89fc8 100644
--- a/scripts/lib/ptxd_make_xpkg_finish.sh
+++ b/scripts/lib/ptxd_make_xpkg_finish.sh
@@ -9,7 +9,20 @@
# see the README file.
#
+#
+# run the actual package creation in fakeroot
+#
+ptxd_make_xpkg_finish_impl() {
+ local -a fake_args
+ if [ -f "${pkg_fake_env}" ]; then
+ fake_args=( "-i" "${pkg_fake_env}" )
+ fi
+ fake_args[${#fake_args[@]}]="-u"
+ export ${!pkg_*} ${!ptx_*}
+ fakeroot "${fake_args[@]}" -- "ptxd_make_${pkg_xpkg_type}_finish_impl"
+}
+export -f ptxd_make_xpkg_finish_impl
#
# function to create a generic package
@@ -57,7 +70,7 @@ EOF
# create pkg
#
echo "xpkg_finish: creating ${pkg_xpkg_type} package ... " &&
- "ptxd_make_${pkg_xpkg_type}_finish" &&
+ ptxd_make_xpkg_finish_impl &&
rm -rf "${pkg_xpkg_tmp}" || {
local ret=$?
echo "failed"