summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-03-03 16:25:02 +0000
committerWolfram Sang <w.sang@pengutronix.de>2008-03-03 16:25:02 +0000
commit12b91b59a2f0974d648fc3600716ee94a704d4c8 (patch)
tree855e9c6e9378bf251a8f2bd24e4d047d1a9f3865 /scripts
parent9e9229f9ef4c69955aeb6a4685dc26354e27ea96 (diff)
downloadptxdist-12b91b59a2f0974d648fc3600716ee94a704d4c8.tar.gz
ptxdist-12b91b59a2f0974d648fc3600716ee94a704d4c8.tar.xz
* scripts/libptxdist.sh
- add function to convert package names into corresponding make-variable names * bin/ptxdist - make check_if_selected use the new function Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7814 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libptxdist.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh
index 8f88e2bb8..7d9906a7d 100644
--- a/scripts/libptxdist.sh
+++ b/scripts/libptxdist.sh
@@ -113,6 +113,19 @@ ptxd_human_to_number() {
}
#
+# convert a package name into its make_name (i.e. host-foo -> HOST_FOO)
+#
+ptxd_name_to_NAME() {
+ local name
+ if [ "$#" != 1 ]; then
+ echo "usage: ptxd_name_to_NAME <pkg-name>"
+ exit 1
+ fi
+ name=$(echo $1 | tr 'a-z-' 'A-Z_')
+ echo $name
+}
+
+#
# customized exit functions
#
# $1 --> Error Message