potential problems when iso filename contains more dots
Bug #508210 reported by
Claude Heiland-Allen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bouilloncube |
Fix Committed
|
High
|
danstowell |
Bug Description
if [ `echo $1 | cut -d . -f 2` == "iso" ] ; then
will break if/when iso filename contains more than one '.'
To post a comment you must log in.
I thought I'd be safe from this but then...
$ sudo ./make- live-device. sh ../../puredyne- 910-carrot_ and_coriander- CD.iso /dev/sdb live-device. sh: line 52: [: ==: unary operator expected
[sudo] password for dan:
[?] Are you sure your target is /dev/sdb ? (y/n)y
./make-
[!] Wrong source. Please either specify an ISO file or use 'live' to use the current live system as source.
I've committed a fix (rev #51) which uses a bash syntax for directly getting the file extension.