install stage 1: readability improvements

master
BodgeMaster 2023-07-02 20:52:21 +02:00
parent d7629049d6
commit c4441aab07
1 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
LOGFILE=/tmp/void-usb-install-log
GIT_REPO_BASE="https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master"
function press_any_key {
echo "Press any key to continue or Ctrl+c to abort..."
@ -213,6 +214,7 @@ mkdir -p /mnt/target/var/db/xbps/keys >> $LOGFILE 2>&1
cp /var/db/xbps/keys/* /mnt/target/var/db/xbps/keys/ >> $LOGFILE 2>&1
echo "done"
clear
echo "The next step is installing packages for base system components.
Depending on your internet connection, your USB stick, and the phase of the moon, this may take a while.
The XBPS log will be displayed for this step.
@ -247,20 +249,20 @@ omit_dracutmodules+=" nvdimm resume "' > /mnt/target/etc/dracut.conf.d/99-void-u
echo -n "Adding dracut module void-usb... "
mkdir -p /mnt/target/lib/dracut/modules.d/90void-usb >> $LOGFILE 2>&1
chmod 755 /mnt/target/lib/dracut/modules.d/90void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/module-setup.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/module-setup.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/module-setup.sh "$GIT_REPO_BASE/dracut-modules/90void-usb/module-setup.sh" >> $LOGFILE 2>&1
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/module-setup.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/create-loop0.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/create-loop0.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/create-loop0.sh "$GIT_REPO_BASE/dracut-modules/90void-usb/create-loop0.sh" >> $LOGFILE 2>&1
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/create-loop0.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/squashfs-img.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/squashfs-img.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/squashfs-img.sh "$GIT_REPO_BASE/dracut-modules/90void-usb/squashfs-img.sh" >> $LOGFILE 2>&1
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/squashfs-img.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/overlay.sh >> $LOGFILE 2>&1
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh "$GIT_REPO_BASE/dracut-modules/90void-usb/overlay.sh" >> $LOGFILE 2>&1
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh >> $LOGFILE 2>&1
echo "done"
echo -n "Adding file system helper... "
mkdir -p /mnt/target/opt/void-usb >> $LOGFILE 2>&1
chmod 755 /mnt/target/opt/void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/opt/void-usb/backup-fs https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/opt/backup-fs >> $LOGFILE 2>&1
wget --output-document=/mnt/target/opt/void-usb/backup-fs "$GIT_REPO_BASE/opt/backup-fs" >> $LOGFILE 2>&1
chmod 744 /mnt/target/opt/void-usb/backup-fs >> $LOGFILE 2>&1
echo "
/opt/void-usb/backup-fs" >> /mnt/target/etc/rc.shutdown
@ -369,16 +371,16 @@ run_in_target grub-install --target=x86_64-efi --boot-directory=/boot/efi/LOADER
echo "done"
echo -n "Adding grub-config helper... "
wget --output-document=/mnt/target/opt/void-usb/grub-config https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/opt/grub-config >> $LOGFILE 2>&1
wget --output-document=/mnt/target/opt/void-usb/grub-config "$GIT_REPO_BASE/opt/grub-config" >> $LOGFILE 2>&1
chmod 744 /mnt/target/opt/void-usb/grub-config >> $LOGFILE 2>&1
echo "done"
echo -n "Adding kernel hooks... "
wget --output-document=/mnt/target/etc/kernel.d/pre-install/99-void-usb https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/kernel.d/pre-install/99-void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/etc/kernel.d/pre-install/99-void-usb "$GIT_REPO_BASE/kernel.d/pre-install/99-void-usb" >> $LOGFILE 2>&1
chmod 744 /mnt/target/etc/kernel.d/pre-install/99-void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/etc/kernel.d/post-install/99-void-usb https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/kernel.d/post-install/99-void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/etc/kernel.d/post-install/99-void-usb "$GIT_REPO_BASE/kernel.d/post-install/99-void-usb" >> $LOGFILE 2>&1
chmod 744 /mnt/target/etc/kernel.d/post-install/99-void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/etc/kernel.d/post-remove/99-void-usb https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/kernel.d/post-remove/99-void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/etc/kernel.d/post-remove/99-void-usb "$GIT_REPO_BASE/kernel.d/post-remove/99-void-usb" >> $LOGFILE 2>&1
chmod 744 /mnt/target/etc/kernel.d/post-remove/99-void-usb >> $LOGFILE 2>&1
echo "done"