summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2006-06-14 10:16:01 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2006-06-14 10:16:01 +0000
commit025139bd5e534a9beaef7cbebc0d1eceaa89a3e6 (patch)
tree77719ce5bd66d3ea2959916d7d7cc6c0ae1b394d /bin
parent05db4e4a7e97e40271ec1651d3bbf301310a0daa (diff)
downloadptxdist-025139bd5e534a9beaef7cbebc0d1eceaa89a3e6.tar.gz
ptxdist-025139bd5e534a9beaef7cbebc0d1eceaa89a3e6.tar.xz
* 'ptxdist newpacket': fix naming scheme of newly created file
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.10-trunk@5779 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 537fb5d65..ec41206fa 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -422,7 +422,7 @@ menuconfig_action() {
}
newpacket () {
- local template
+ local template packetfile
case $1 in
host) template=template-host ;;
@@ -453,10 +453,17 @@ newpacket () {
PACKET_NAME="`echo $PACKET_NAME| tr - _`"
packet=`echo $PACKET_NAME | tr "[A-Z]" "[a-z]"`
PACKET=`echo $PACKET_NAME | tr "[a-z]" "[A-Z]"`
+
+ case $1 in
+ host) packetfile=host-${packet}.make ;;
+ target) packetfile=${packet}.make ;;
+ cross) packetfile=cross-${packet}.make ;;
+ source) packetfile=${packet}.make ;;
+ esac
- if [ -f "${packet}.make" ]; then
+ if [ -f "${packetfile}" ]; then
echo
- echo -n "${PROMPT}warning: ${packet}.make does already exist, overwrite? "
+ echo -n "${PROMPT}warning: ${packetfile} does already exist, overwrite? "
read overwrite
if [ "$overwrite" != "y" ]; then
echo "${PROMPT}aborted."
@@ -474,7 +481,7 @@ newpacket () {
-e "s~\@AUTHOR@~${AUTHOR}~g" \
-e "s~\@SUFFIX@~${SUFFIX}~g" \
${PTXDIST_TOPDIR}/rules/${template} \
- > ${packet}.make
+ > ${packetfile}
}