[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 7c924d8179fc8d413d3a898b327e5abb47f8f55f

Luca Capello luca at pca.it
Wed Jun 17 23:13:08 UTC 2009


The following commit has been merged in the master branch:
commit 567e4c18fee3ba9ef8ce7863947366f17baf41b2
Author: Luca Capello <luca at pca.it>
Date:   Wed Jun 17 13:25:54 2009 +0200

    install.sh: refactor format stage
    
    Thanks to Brian DeRocher <brian at derocher.org>.

diff --git a/install.sh b/install.sh
index f681360..ed02c4f 100755
--- a/install.sh
+++ b/install.sh
@@ -736,19 +736,15 @@ action_format () {
 	if [ -z "$SD_SWAP_SIZE" ]; then SD_SWAP_SIZE=0; fi
 
 	echo " * Formatting the microSD card partitions"
-	if [ "$SINGLE_PART" = "true" ]; then
-		mkfs.ext2 ${SD_DEVICE}p1
-		if [ 0 -lt "$SD_SWAP_SIZE" ]; then
-			echo " * Formatting swap on ${SD_DEVICE}p2"
-			mkswap ${SD_DEVICE}p2
-		fi
-	else
-		mkfs.$SD_PART1_FS ${SD_DEVICE}p1
+	mkfs.$SD_PART1_FS ${SD_DEVICE}p1
+	nextpart=2
+	if [ "$SINGLE_PART" != "true" ]; then
 		mkfs.$SD_PART2_FS ${SD_DEVICE}p2
-		if [ 0 -lt "$SD_SWAP_SIZE" ]; then
-			echo " * Formatting swap on ${SD_DEVICE}p3"
-			mkswap ${SD_DEVICE}p3
-		fi
+		nextpart=3
+	fi
+	if [ 0 -lt "$SD_SWAP_SIZE" ]; then
+		echo " * Formatting swap on ${SD_DEVICE}p${nextpart}"
+		mkswap ${SD_DEVICE}p${nextpart}
 	fi
 
 	echo "I: microSD card ready"

-- 
Various non-packaged files



More information about the pkg-fso-commits mailing list