Skip to content

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

@thecomputerking

Description

@thecomputerking
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###################################################################'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions