Permalink
Browse files

Merge pull request #2 from andypiper/master

Merged with Andy Piper's fork (Updated docs and cleaned up strings)
  • Loading branch information...
2 parents 66a18f5 + 60933fe commit 62f051765b8cf6254cecec0bfc0c28192e3261a3 @exaviorn committed May 15, 2012
Showing with 34 additions and 29 deletions.
  1. +0 −22 README
  2. +27 −0 README.md
  3. +7 −7 raspiwrite.py
View
22 README
@@ -1,22 +0,0 @@
-RasPiWrite
-by Matt Jump
-####################
-About:
-RasPiWrite is a simple and easily modifiable python script that automates the process of mounting, downloading and installing a Raspberry Pi Distro, currently the script is
-only compatiable with Mac OSX systems, mostly because currently Macs have no easy way of installing Raspberry Pi distros, however I will try and make the script universal for all
-unix systems as soon as I can.
-
-Install:
-unzip: 'unzip RaspiWrite.zip'
-chmod +x raspiwrite.py
-sudo ./raspiwrite.py (or run as root)
-
-So...What can I do?
-RasPiWrite supports all the distros currently on the Official Raspberry Pi downloads page, the script will choose a mirror at random to help ease the pressure on the mirror
-network.
-
-Warning -
-Please bear in mind that this software is very much in Beta, if you don't follow all instructions provided, you may screw something up majorly!
-
-Support and Up-to-date info:
-exaviorn.com and raspi.exaviorn.com
View
@@ -0,0 +1,27 @@
+# RasPiWrite
+
+**Author:** Matt Jump
+
+## About
+RasPiWrite is a simple and easily modifiable Python script that automates the process of mounting an SD card and downloading and installing a Linux image for a [Raspberry Pi](http://raspberrypi.org).
+
+Currently the script is only compatible with Mac OS X systems, mostly because Macs have no easy way of installing Raspberry Pi distros. The goal is to try to make the script universal for all UNIX-like systems over time.
+
+## Install
+
+Either clone the git repository, or download the zip file.
+
+ unzip RaspiWrite.zip
+ chmod +x raspiwrite.py
+
+## Usage
+
+ sudo ./raspiwrite.py
+
+RasPiWrite supports all the distros currently on the [official Raspberry Pi Downloads](http://raspberrypi.org/downloads) page. The script will choose a mirror at random to help ease the pressure on the network.
+
+***Warning***
+*Please bear in mind that this software is in beta, if you don't follow all instructions provided, you may screw something up...*
+
+Support and up-to-date info:
+[exaviorn.com](exaviorn.com)
View
@@ -79,7 +79,7 @@ def checkforUpdate():
print '''#####################################################################################################################
'''
else:
- print '''Your version of RasPiWrite is up to date
+ print '''Your version of RasPiWrite is up-to-date
'''
except urllib2.URLError, e:
@@ -285,7 +285,7 @@ def transfer(file,archiveType,obtain,SD,URL): #unzips the disk image
def getImage(SD): #gives the user a bunch of options to download an image, or select their own, it then passes the user on to the transfer function
global boldStart
global end
- userChoice = raw_input('Do you wish to Download a Raspberry Pi compatiable image (choose yes if you don\'t have one) (Y/n): ')
+ userChoice = raw_input('Do you wish to Download a Raspberry Pi compatible image (choose yes if you don\'t have one) (Y/n): ')
if (userChoice == 'Y') or (userChoice == 'y'):
print boldStart + """
> Debian \"Squeeze\" [OPTION 1]""" + end + """
@@ -364,7 +364,7 @@ def driveTest(SD):
manualID = raw_input("Please enter the location you believe holds the SD Card: ")
driveTest(manualID)
else:
- sdID = raw_input("I Believe this is your SD card: " + SD + " is that correct? (Y/n) ")
+ sdID = raw_input("I believe this is your SD card: " + SD + " is that correct? (Y/n) ")
if (sdID == 'Y') or (sdID == 'y'): #continue
unmount(SD) #<--works, so don't need to test
getImage(SD)
@@ -401,17 +401,17 @@ def driveTest(SD):
"""
OS = os.uname() #gets OS vars
if OS[0] != 'Darwin': #if Mac OS, will change to posix once I have worked around some of the command differences
- print WARNING + 'I\'m sorry, but your os isn\'t supported at this time, Linux/Unix users - please tune in soon for a posix version' + end
+ print WARNING + 'I\'m sorry, but your OS isn\'t supported at this time, Linux/Unix users - please tune in soon for a POSIX version' + end
exit()
if not os.geteuid()==0:
- print WARNING + 'Please run the script as root, or use sudo e.g. sudo python raspidwrite.py, or sudo ./raspidwrite.py (need to chmod +x)' + end
+ print WARNING + 'Please run the script using sudo e.g. sudo python raspiwrite.py, or sudo ./raspiwrite.py (need to chmod +x first)' + end
exit()
checkforUpdate()
-print 'The following script is designed to copy a Raspberry Pi compatiable disk image to an SD Card'
+print 'The following script is designed to copy a Raspberry Pi compatible disk image to an SD Card'
print boldStart + 'INCORRECTLY FOLLOWING THE WIZARD COULD RESULT IN THE CORRUPTION OF YOUR HARD DISK, PARTITIONS OR A BACKUP USB DRIVE (INCLUDING MOUNTED TIME MACHINE BACKUP DRIVES)' +end
print 'It is advisable to remove any other USB HDDs or memory sticks, the wizard might select that one, %s if you have multiple hard drives installed, please take a LOT of care selecting the right drive %s'% (boldStart, end)
text = getoutput('df -h')
-raw_input('Now enter your SD Card, press enter when you are ready...')
+raw_input('Now insert your SD Card, press enter when you are ready...')
text2 = getoutput('df -h')
print """
\n---------------------------------------------------------

0 comments on commit 62f0517

Please sign in to comment.