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

patch, looks like others have posted some related to this in issues #23

Open
thecomputerking opened this issue Aug 18, 2012 · 2 comments

Comments

@thecomputerking
Copy link

diff -u ../exaviorn-RasPiWrite-413db87/raspiwrite.py fixed_raspiwrite.py

--- ../exaviorn-RasPiWrite-413db87/raspiwrite.py    2012-07-15 17:24:52.000000000 -0400
+++ fixed_raspiwrite.py 2012-08-17 20:48:26.000000000 -0400
@@ -174,7 +174,7 @@
    global path
    if OS[0] != 'Darwin':
        copyString = 'dd bs=1M if=%s of=%s' % (path,SDsnip)
-   else
+   else:
        copyString = 'dd bs=1m if=%s of=%s' % (path,SDsnip)
    print 'Running ' + copyString + '...'

 @@ -187,7 +187,8 @@
    if archiveType == 'zip': 
        #path =  file.replace(".zip", "") + '/' + file.replace(".zip", ".img") <- my old code
        path = file.replace(".zip", "") + '/' + os.path.basename(file).replace(".zip", ".img") #Thanks to Lewis Boon
-       extractCMD = 'unzip ' + file
+       #extractCMD = 'unzip ' + file
+       extractCMD = 'unzip -j -d '+ file.replace(".zip", " ") + file
 
    if archiveType == 'img': 
        path =  file;

@@ -272,10 +272,10 @@
        SDsnip = "/dev/mmcblk" + SD[11]
    else:
        if OS[0] != 'Darwin': 
-           SDsnip =  SD.replace(' ', '')[:-1]
+           SDsnip =  SD.replace(' ', '')[:-1]
        else:
            # remove weird partition notation in OS X partition names
-           SDsnip =  SD.replace(' ', '')[:-2]
+           SDsnip =  SD.replace(' ', '')[:-2]
 
    print path
    print '\n\n###################################################################'

@thecomputerking
Copy link
Author

For some reason, line 275 and below didn't pickup indentation that python expected.

@thecomputerking
Copy link
Author

Added some unzip changes at about 187. Still having trouble when manually entering disk location using my mac. The "raw_write" gets it, but your prejudicial truncation of "SD" because of "remove weird partition notation in OS X partition names" needs to be reexamined.

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

1 participant