Skip to content

Loading…

Tries to write wrong file on OSX. #38

Open
Timmmm opened this Issue · 1 comment

2 participants

@Timmmm

Hi, this script needs work! On OSX it tries to run this:

Running dd bs=1m if=2012-09-18-wheezy-raspbian/2012-09-18-wheezy-raspbian.img of=/dev/disk1...
Waitingdd: 2012-09-18-wheezy-raspbian/2012-09-18-wheezy-raspbian.img: No such file or directory

It can't find the file because ...raspbian.img is unzipped into the same level as ...raspbian.zip, not into a subdirectory. This may be something OSX does weird or maybe raspbian have changed the layout of their zip. In any case you should list the contents of the zip file and look for the largest .img file in it, then use that.

@bryanlb

This can be fixed by making the following change on line 189.

Replace:

path = file.replace(".zip", "") + '/' + os.path.basename(file).replace(".zip", ".img") #Thanks to Lewis Boon

With:

path = os.path.basename(file).replace(".zip", ".img") 

Looks like unzipping utility handles things slightly differently, depending on the OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.