/[mdap]/tftp-iselect.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /tftp-iselect.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 36 - (show annotations)
Wed Apr 25 10:53:40 2007 UTC (16 years, 11 months ago) by dpavlin
File MIME type: application/x-sh
File size: 507 byte(s)
display name in iselect
1 #!/bin/sh
2
3 tftp=/srv/tftp/
4 tmp=/tmp/tftp
5 fw_info=/root/mdap/fw-info.pl
6
7 echo "Select firmware image to flash: " > $tmp
8 echo > $tmp
9
10 which=`find $tftp -type f | xargs -i $fw_info {} 2>/dev/null | sed -e "s!$tftp!!" -e 's!^!<s>!' -e 's!^<s>\(.* BANT-R\)!\1!' | iselect -c -n "Select firmware file"`
11
12 test -z "$which" && exit
13
14 version=`echo $which | cut -d" " -f1`
15 path=`echo $which | cut -d" " -f2-`
16
17 echo "Using $path [$version]"
18
19 cp $tftp/$path $tftp/BANT-R.new && mv $tftp/BANT-R.new $tftp/BANT-R
20
21 rm $tmp

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26