aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-08-20 16:28:18 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-08-20 16:28:18 +0200
commit054fb8120d58b07772b3f9acc82540776533b0a2 (patch)
tree5136d1f5833910d8badda8b63dbc47b5ddc3f5b0
parent23dd47a43566698c82eb53f9d4ff90fb5a40d307 (diff)
get the new path parameters
-rwxr-xr-xarmtixinstall22
1 files changed, 22 insertions, 0 deletions
diff --git a/armtixinstall b/armtixinstall
index a849265..320be26 100755
--- a/armtixinstall
+++ b/armtixinstall
@@ -16,6 +16,8 @@ pacman -S --needed --noconfirm parted fzf artools-base
DRIVE=$1
IMG=$2
+BOOTLOADER=$3
+FIRMWARE=$4
if [ -z "${DRIVE}" ]; then
DRIVE="/dev/$(lsblk | grep disk | fzf --disabled | awk '{print $1}')"
@@ -37,6 +39,26 @@ if [ -z "${IMG}" ]; then
exit 1
fi
+if [ -z "${BOOTLOADER}" ]; then
+ BOOTLOADER=$(echo "Enter bootloader path (download from archlinuxarm.org): " | fzf --disabled --print-query | sed -n '1 p')
+fi
+
+# Needed because otherwise the Raspberry Pi won't boot.
+if [ -z "${BOOTLOADER}" ]; then
+ echo -e "\e[1m\e[1;31mBootloader path must not be empty.\e[0m"
+ exit 1
+fi
+
+if [ -z "${FIRMWARE}" ]; then
+ FIRMWARE=$(echo "Enter firmware path (download from archlinuxarm.org): " | fzf --disabled --print-query | sed -n '1 p')
+fi
+
+# Needed because otherwise the Raspberry Pi won't boot.
+if [ -z "${FIRMWARE}" ]; then
+ echo -e "\e[1m\e[1;31mFirmware path must not be empty.\e[0m"
+ exit 1
+fi
+
parted -s ${DRIVE} mklabel msdos
parted -s -a optimal ${DRIVE} mkpart primary fat32 0% 512MiB
parted -s -a optimal ${DRIVE} mkpart primary btrfs 512MiB 100%