/[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

Annotation of /tftp-iselect.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 38 - (hide annotations)
Mon May 7 18:34:11 2007 UTC (16 years, 11 months ago) by dpavlin
File MIME type: application/x-sh
File size: 514 byte(s)
order firmwares by version and filename
1 dpavlin 22 #!/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 dpavlin 38 which=`find $tftp -type f | xargs -i $fw_info {} 2>/dev/null | sort | sed -e "s!$tftp!!" -e 's!^!<s>!' -e 's!^<s>\(.* BANT-R\)!\1!' | iselect -c -n "Select firmware file"`
11 dpavlin 22
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