summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-07-09 10:59:43 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-07-15 13:28:09 +0200
commita7dabeb0feb611ce3e99916070a37b00ed7a1388 (patch)
treef26df6b246cc61ab088a348649083d4a98901b1d /scripts
parent200ce8c523e2b31a492d012aef2d38b1b504a6bc (diff)
downloadptxdist-a7dabeb0feb611ce3e99916070a37b00ed7a1388.tar.gz
ptxdist-a7dabeb0feb611ce3e99916070a37b00ed7a1388.tar.xz
[targetinstall] sanitize xpkg variable
This patch sanitizes value of the pkg_xpkg variable. It should only contain the chars allowed for ipkg package names. For now we only replace "_" by "-". Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_xpkg_common.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_common.sh b/scripts/lib/ptxd_make_xpkg_common.sh
index 89cde2c81..95aa714fd 100644
--- a/scripts/lib/ptxd_make_xpkg_common.sh
+++ b/scripts/lib/ptxd_make_xpkg_common.sh
@@ -32,6 +32,13 @@ ptxd_make_xpkg_init() {
ptxd_bailout "'pkg_xpkg' or 'pkg_xpkg_type' undefined"
fi
+ #
+ # sanitize pkg_xpkg name
+ #
+ # replace "_" by "-"
+ #
+ pkg_xpkg="${pkg_xpkg//_/-}"
+
ptxd_make_world_init || return
# license