Simplify Arch installation script

This commit is contained in:
Manuel Thalmann 2024-03-23 16:31:10 +01:00
parent a3b88a2598
commit 777e35ba29
3 changed files with 47 additions and 18 deletions

View file

@ -1,15 +1,13 @@
#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
. "../../../scripts/Arch/OS/install.sh";
. "../../../scripts/Arch/Config/SecureBoot/install.sh";
. "../../../scripts/Arch/Software/nvidia-dkms/install.sh";
. "../../../scripts/Arch/Software/xone/install.sh";
. "../../../scripts/Arch/Software/bt-dualboot/install.sh";
. "../../../scripts/Arch/Collections/personal.sh";
function installDrivers() {
. "../../../scripts/Arch/Config/SecureBoot/install.sh";
. "../../../scripts/Arch/Software/nvidia-dkms/install.sh";
. "../../../scripts/Arch/Software/xone/install.sh";
. "../../../scripts/Arch/Software/bt-dualboot/install.sh";
}
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" \
INSTALL_FONTS=0 \
. "../../../scripts/Common/Config/UserProfile/install.sh";
. "../../../scripts/Arch/OS/install.sh";
popd > /dev/null;

View file

@ -1,15 +1,20 @@
#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
function installDrivers() {
. "../../../scripts/Arch/Config/SecureBoot/install.sh";
. "../../../scripts/Arch/Devices/SurfaceBook2/install.sh";
}
function installSoftware() {
. "../../../scripts/Arch/Collections/school.sh";
}
function initializeConfig() {
. "../../../scripts/Common/Config/Steam/hidpi.sh";
}
. "../../../scripts/Arch/OS/install.sh";
. "../../../scripts/Arch/Config/SecureBoot/install.sh";
. "../../../scripts/Arch/Devices/SurfaceBook2/install.sh";
. "../../../scripts/Arch/Collections/school.sh";
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" \
INSTALL_FONTS=0 \
. "../../../scripts/Common/Config/UserProfile/install.sh";
. "../../../scripts/Common/Config/Steam/hidpi.sh";
popd > /dev/null;

View file

@ -1,5 +1,6 @@
#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
$rootDir="${BASH_SOURCE%/*}";
pushd "$rootDir" > /dev/null;
. "../Software/base-devel/install.sh";
. "../Config/pacman/install.sh";
@ -7,4 +8,29 @@ pushd "${BASH_SOURCE%/*}" > /dev/null;
sudo pacman --noconfirm -Syu pacman-contrib;
function runHook() {
function fallback() {
${@:2};
}
if command -v $1 > /dev/null
then
$1 fallback;
else
fallback;
fi;
}
runHook installDrivers;
runHook installSoftware \
. "$(pwd)/../Collections/personal.sh";
runHook initializeConfig;
runHook initializeProfile \
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" \
INSTALL_FONTS=0 \
. "$(pwd)/../../../scripts/Common/Config/UserProfile/install.sh";
popd > /dev/null;