From 568313c06a63b40ee875fdce4269406a7d5bee85 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 23 Jun 2024 17:06:29 +0200 Subject: [PATCH] Fix relative paths in ManuSurface install script --- profiles/ManuSurface/Arch/install.sh | 48 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/profiles/ManuSurface/Arch/install.sh b/profiles/ManuSurface/Arch/install.sh index ddbb04b0..799ad16a 100755 --- a/profiles/ManuSurface/Arch/install.sh +++ b/profiles/ManuSurface/Arch/install.sh @@ -1,28 +1,28 @@ #!/bin/bash -e -pushd "${BASH_SOURCE%/*}" > /dev/null; +function install() { + local dir="$(realpath "${BASH_SOURCE%/*}")"; -function installDrivers() { - local dir="${BASH_SOURCE%/*}"; - . "$dir/../../../scripts/Arch/Config/SecureBoot/install.sh"; - . "$dir/../../../scripts/Arch/Drivers/SurfaceBook2/install.sh"; + function installDrivers() { + . "$dir/../../../scripts/Arch/Config/SecureBoot/install.sh"; + . "$dir/../../../scripts/Arch/Drivers/SurfaceBook2/install.sh"; + } + + function installSoftware() { + . "$dir/../../../scripts/Arch/Collections/school.sh"; + } + + function initializeConfig() { + . "$dir/../../../scripts/Common/Config/Steam/hidpi.sh"; + . "$dir/../../../scripts/Unix/Devices/Surface Book 2/install.sh"; + . "$dir/../../../scripts/Unix/Devices/Logitech G903/install.sh"; + + # Because, as it looks, Surface Books are fucking stupid. + . "$dir/../../../scripts/Common/Config/GRUB/verbose.sh"; + } + + pushd "$dir" > /dev/null; + . "../../../scripts/Arch/OS/install.sh"; + popd > /dev/null; } -function installSoftware() { - local dir="${BASH_SOURCE%/*}"; - . "$dir/../../../scripts/Arch/Collections/school.sh"; -} - -function initializeConfig() { - local dir="${BASH_SOURCE%/*}"; - . "$dir/../../../scripts/Common/Config/Steam/hidpi.sh"; - . "$dir/../../../scripts/Unix/Devices/Surface Book 2/install.sh"; - . "$dir/../../../scripts/Unix/Devices/Logitech G903/install.sh"; - - # Because, as it looks, Surface Books are fucking stupid. - . "$dir/../../../scripts/Common/Config/GRUB/verbose.sh"; -} - -. "../../../scripts/Arch/OS/install.sh"; - - -popd > /dev/null; +install;