From 9d045f40f01d43030fafd67b69fac686ced544da Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 26 Jun 2024 15:49:03 +0200 Subject: [PATCH] Fix working directory issues during installation --- profiles/DerGeret/Arch/install.sh | 13 ++---------- profiles/DerGeret/Arch/scripts/drivers.sh | 7 +++++++ profiles/ManuSurface/Arch/install.sh | 21 +++----------------- profiles/ManuSurface/Arch/scripts/config.sh | 9 +++++++++ profiles/ManuSurface/Arch/scripts/drivers.sh | 5 +++++ 5 files changed, 26 insertions(+), 29 deletions(-) create mode 100755 profiles/DerGeret/Arch/scripts/drivers.sh create mode 100755 profiles/ManuSurface/Arch/scripts/config.sh create mode 100755 profiles/ManuSurface/Arch/scripts/drivers.sh diff --git a/profiles/DerGeret/Arch/install.sh b/profiles/DerGeret/Arch/install.sh index a6a1cb40..4d47a009 100755 --- a/profiles/DerGeret/Arch/install.sh +++ b/profiles/DerGeret/Arch/install.sh @@ -1,17 +1,8 @@ #!/bin/bash -e function install() { local dir="$(realpath "${BASH_SOURCE%/*}")"; - - function installDrivers() { - . "$dir/../../../scripts/Arch/Config/SecureBoot/install.sh"; - . "$dir/../../../scripts/Arch/Software/nvidia-dkms/install.sh"; - . "$dir/../../../scripts/Arch/Software/xone/install.sh"; - . "$dir/../../../scripts/Arch/Software/bt-dualboot/install.sh"; - } - - function initializeConfig() { - . "$dir/../../../scripts/Unix/Devices/Logitech G903/install.sh"; - } + alias installDrivers=". ${dir@Q}/scripts/drivers.sh"; + alias initializeConfig=". ${dir@Q}/../../../scripts/Unix/Devices/Logitech G903/install.sh"; pushd "$dir" > /dev/null; . "../../../scripts/Arch/OS/install.sh"; diff --git a/profiles/DerGeret/Arch/scripts/drivers.sh b/profiles/DerGeret/Arch/scripts/drivers.sh new file mode 100755 index 00000000..c26f9c34 --- /dev/null +++ b/profiles/DerGeret/Arch/scripts/drivers.sh @@ -0,0 +1,7 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; +. "$dir/../../../scripts/Arch/Config/SecureBoot/install.sh"; +. "$dir/../../../scripts/Arch/Software/nvidia-dkms/install.sh"; +. "$dir/../../../scripts/Arch/Software/xone/install.sh"; +. "$dir/../../../scripts/Arch/Software/bt-dualboot/install.sh"; +popd > /dev/null; diff --git a/profiles/ManuSurface/Arch/install.sh b/profiles/ManuSurface/Arch/install.sh index 799ad16a..8147309e 100755 --- a/profiles/ManuSurface/Arch/install.sh +++ b/profiles/ManuSurface/Arch/install.sh @@ -1,24 +1,9 @@ #!/bin/bash -e function install() { local dir="$(realpath "${BASH_SOURCE%/*}")"; - - 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"; - } + alias installDrivers=". ${dir@Q}/scripts/drivers.sh"; + alias installSoftware=". ${dir@Q}/../../../scripts/Arch/Collections/school.sh"; + alias initializeConfig=". ${dir@Q}/scripts/config.sh"; pushd "$dir" > /dev/null; . "../../../scripts/Arch/OS/install.sh"; diff --git a/profiles/ManuSurface/Arch/scripts/config.sh b/profiles/ManuSurface/Arch/scripts/config.sh new file mode 100755 index 00000000..ead3643e --- /dev/null +++ b/profiles/ManuSurface/Arch/scripts/config.sh @@ -0,0 +1,9 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; +. "../../../scripts/Common/Config/Steam/hidpi.sh"; +. "../../../scripts/Unix/Devices/Surface Book 2/install.sh"; +. "../../../scripts/Unix/Devices/Logitech G903/install.sh"; + +# Because, as it looks, Surface Books are fucking stupid. +. "$dir/../../../scripts/Common/Config/GRUB/verbose.sh"; +popd > /dev/null; diff --git a/profiles/ManuSurface/Arch/scripts/drivers.sh b/profiles/ManuSurface/Arch/scripts/drivers.sh new file mode 100755 index 00000000..dc55de2f --- /dev/null +++ b/profiles/ManuSurface/Arch/scripts/drivers.sh @@ -0,0 +1,5 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; +. "../../../scripts/Arch/Config/SecureBoot/install.sh"; +. "../../../scripts/Arch/Drivers/SurfaceBook2/install.sh"; +popd > /dev/null;