From 2d2c4d58027604b8f7662babe77439b38f1269cd Mon Sep 17 00:00:00 2001 From: framp Date: Sat, 27 Jan 2018 20:45:32 +0100 Subject: [PATCH 1/2] Added installation instructions in README --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e8e0925..cce1fe2 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ # PiShrink # PiShrink is a bash script that automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better. -`Usage: sudo ./pishrink.sh [-s] imagefile.img [newimagefile.img]` +## Usage ## +`sudo pishrink.sh [-s] imagefile.img [newimagefile.img]` If the `-s` option is given the script will skip the autoexpanding part of the process. If you specify the `newimagefile.img` parameter, the script will make a copy of `imagefile.img` and work off that. You will need enough space to make a full copy of the image to use that option. -## Prerequisites ## -If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run. - ## Example ## ```bash -[user@localhost PiShrink]$ sudo ./pishrink.sh pi.img +[user@localhost PiShrink]$ sudo pishrink.sh pi.img e2fsck 1.42.9 (28-Dec-2013) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure @@ -32,6 +30,16 @@ The filesystem on /dev/loop1 is now 773603 blocks long. Shrunk pi.img from 30G to 3.1G ``` +## Installation ## +```bash +wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh +chmod +x pishrink.sh +sudo mv pishrink.sh /usr/local/bin +``` + +## Prerequisites ## +If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run. + ## Contributing ## If you find a bug please create an issue for it. If you would like a new feature added, you can create an issue for it but I can't promise that I will get to it. From 551e9950accd849e20c79bb7dd73826a6630ecde Mon Sep 17 00:00:00 2001 From: Drew Bonasera Date: Sat, 3 Feb 2018 17:02:23 -0500 Subject: [PATCH 2/2] Reorder Readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cce1fe2..468a383 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ PiShrink is a bash script that automatically shrink a pi image that will then re If the `-s` option is given the script will skip the autoexpanding part of the process. If you specify the `newimagefile.img` parameter, the script will make a copy of `imagefile.img` and work off that. You will need enough space to make a full copy of the image to use that option. +## Prerequisites ## +If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run. + +## Installation ## +```bash +wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh +chmod +x pishrink.sh +sudo mv pishrink.sh /usr/local/bin +``` + ## Example ## ```bash [user@localhost PiShrink]$ sudo pishrink.sh pi.img @@ -30,16 +40,6 @@ The filesystem on /dev/loop1 is now 773603 blocks long. Shrunk pi.img from 30G to 3.1G ``` -## Installation ## -```bash -wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh -chmod +x pishrink.sh -sudo mv pishrink.sh /usr/local/bin -``` - -## Prerequisites ## -If using Ubuntu, you will likely see an error about `e2fsck` being out of date and `metadata_csum`. The simplest fix for this is to use Ubuntu 16.10 and up, as it will save you a lot of hassle in the long run. - ## Contributing ## If you find a bug please create an issue for it. If you would like a new feature added, you can create an issue for it but I can't promise that I will get to it.