summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-10-09 11:40:32 +0000
committerAlyssa Ross <hi@alyssa.is>2022-11-13 23:58:26 +0000
commit7f785eab13efdc81cd997933f7b2703785e5512e (patch)
treeb4be7b68d1e65eac441e47454a68c053cc42d7b2
parent4ad855540f183d4ce39e57f3e1b6f6bc006cae95 (diff)
downloadspectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar.gz
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar.bz2
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar.lz
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar.xz
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.tar.zst
spectrum-7f785eab13efdc81cd997933f7b2703785e5512e.zip
scripts/make-gpt.sh: add support for labels
The label parameter is placed after the UUID one, because it doesn't
always make sense to specify a label, but specifying a UUID should
really be mandatory to ensure reproducible builds.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20221009114036.463071-3-hi@alyssa.is>
-rwxr-xr-xscripts/make-gpt.sh4
-rw-r--r--scripts/sfdisk-field.awk2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/make-gpt.sh b/scripts/make-gpt.sh
index 554182f..3d4c663 100755
--- a/scripts/make-gpt.sh
+++ b/scripts/make-gpt.sh
@@ -4,7 +4,7 @@
 # SPDX-FileCopyrightText: 2022 Unikie
 # SPDX-License-Identifier: EUPL-1.2+
 #
-# usage: make-gpt.sh GPT_PATH PATH:PARTTYPE[:PARTUUID]...
+# usage: make-gpt.sh GPT_PATH PATH:PARTTYPE[:PARTUUID[:PARTLABEL]]...
 
 ONE_MiB=1048576
 TWO_MiB=2097152
@@ -27,7 +27,7 @@ fillPartition() {
 		 dd if="$3" of="$1" seek="$start" count="$size" conv=notrunc)
 }
 
-# Prints the partition path from a PATH:PARTTYPE[:PARTUUID] string.
+# Prints the partition path from a PATH:PARTTYPE[:PARTUUID[:PARTLABEL]] string.
 partitionPath() {
 	awk -F: '{print $1}' <<EOF
 $1
diff --git a/scripts/sfdisk-field.awk b/scripts/sfdisk-field.awk
index b9fa457..0157027 100644
--- a/scripts/sfdisk-field.awk
+++ b/scripts/sfdisk-field.awk
@@ -9,7 +9,7 @@ BEGIN {
 	# first field.
 	skip=1
 
-	split("type uuid", keys)
+	split("type uuid name", keys)
 	split(partition, fields, ":")
 
 	for (n in fields) {