Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tries to write wrong file on OSX. #38

Open
Timmmm opened this issue Sep 28, 2012 · 1 comment
Open

Tries to write wrong file on OSX. #38

Timmmm opened this issue Sep 28, 2012 · 1 comment

Comments

@Timmmm
Copy link

Timmmm commented Sep 28, 2012

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
Copy link

bryanlb commented Oct 13, 2012

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants