diff --git a/profiles/ManuSurface/setup.sh b/profiles/ManuSurface/setup.sh index a1842ae1..8c418cd1 100755 --- a/profiles/ManuSurface/setup.sh +++ b/profiles/ManuSurface/setup.sh @@ -1,21 +1,16 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -scriptRoot="$dir/../../scripts"; -utilRoot="$scriptRoot/Scripts"; -deviceRoot="$scriptRoot/Devices"; -osRoot="$scriptRoot/OS"; -softwareRoot="$scriptRoot/Software"; -configRoot="$scriptRoot/Config"; - +pushd "${BASH_SOURCE%/*}"; # Set Hostname sudo hostnamectl set-hostname ManuSurface; -source "$utilRoot/prepare.sh"; -source "$osRoot/PopOS/install.sh"; -source "$deviceRoot/SurfaceBook2/Setup/install.sh"; -source "$softwareRoot/Collections/school.sh"; -source "$configRoot/UserProfile/school.sh"; + +source "../../scripts/Scripts/prepare.sh"; +source "../../scripts/OS/PopOS/install.sh"; +source "../../scripts/Devices/SurfaceBook2/Setup/install.sh"; +source "../../scripts/Software/Collections/school.sh"; +source "../../scripts/Config/UserProfile/school.sh"; # Install equalizer -source "$configRoot/EasyEffects/SurfaceBook2/install.sh"; +source "../../scripts/Config/EasyEffects/SurfaceBook2/install.sh"; -source "$utilRoot/postinstall.sh"; +source "../../scripts/Scripts/postinstall.sh"; +popd; diff --git a/profiles/PopOSLive/setup.sh b/profiles/PopOSLive/setup.sh index ab22c875..9bc0512a 100755 --- a/profiles/PopOSLive/setup.sh +++ b/profiles/PopOSLive/setup.sh @@ -1,17 +1,12 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -scriptRoot="$dir/../../scripts"; -utilRoot="$scriptRoot/Scripts"; -deviceRoot="$scriptRoot/Devices"; -osRoot="$scriptRoot/OS"; -softwareRoot="$scriptRoot/Software"; -configRoot="$scriptRoot/Config"; +pushd "${BASH_SOURCE%/*}"; # Set Hostname sudo hostnamectl set-hostname ManuPopOSLive; -source "$utilRoot/prepare.sh"; -source "$osRoot/PopOS/install.sh"; -source "$softwareRoot/Collections/personal.sh"; -source "$configRoot/UserProfile/personal.sh"; +source "../../scripts/Scripts/prepare.sh"; +source "../../scripts/OS/PopOS/install.sh"; +source "../../scripts/Software/Collections/personal.sh"; +source "../../scripts/Config/UserProfile/personal.sh"; -source "$utilRoot/postinstall.sh"; +source "../../scripts/Scripts/postinstall.sh"; +popd; diff --git a/scripts/Config/Fonts/MicrosoftFonts/install.sh b/scripts/Config/Fonts/MicrosoftFonts/install.sh index 3b521e49..2ff4ee24 100755 --- a/scripts/Config/Fonts/MicrosoftFonts/install.sh +++ b/scripts/Config/Fonts/MicrosoftFonts/install.sh @@ -16,6 +16,7 @@ else git clone https://aur.archlinux.org/ttf-ms-win11-auto.git ttf-win11; cd ttf-win11; + # shellcheck source=/dev/null source ./PKGBUILD; prepare; package_ttf-ms-win11-auto; diff --git a/scripts/Config/UserProfile/personal.sh b/scripts/Config/UserProfile/personal.sh index 4b5aeffd..d121350b 100755 --- a/scripts/Config/UserProfile/personal.sh +++ b/scripts/Config/UserProfile/personal.sh @@ -1,5 +1,6 @@ #!/bin/bash dir="${BASH_SOURCE%/*}"; +pushd "$dir"; scriptRoot="$dir/../.."; softwareRoot="$scriptRoot/Software"; configRoot="$scriptRoot/Config"; @@ -7,18 +8,21 @@ cloudRoot="$configRoot/rclone"; # Sync clouds { - gnome-terminal --tab --wait -- /bin/bash "$cloudRoot/InstallSync.sh" nextcloud Nextcloud; + pushd "$dir"; + gnome-terminal --tab --wait -- /bin/bash "../../Config/rclone/InstallSync.sh" nextcloud Nextcloud; # Install fonts - source "$configRoot/Fonts/NerdFont/install.sh"; - source "$softwareRoot/Oh My Posh/install.sh"; + source "../../Config/Fonts/NerdFont/install.sh"; + source "../../Software/Oh My Posh/install.sh"; + popd; } & # Microsoft Windows Fonts -source "$configRoot/Fonts/MicrosoftFonts/install.sh"; +source "../../Config/Fonts/MicrosoftFonts/install.sh"; # Git Config -source "$configRoot/git/setup/install.sh"; +source "../../Config/git/setup/install.sh"; # Troll Stuff -source "$configRoot/git/git-auf-deutsch/install.sh"; +source "../../Config/git/git-auf-deutsch/install.sh"; +popd; diff --git a/scripts/Config/UserProfile/school.sh b/scripts/Config/UserProfile/school.sh index 71976ff9..6092e9bc 100755 --- a/scripts/Config/UserProfile/school.sh +++ b/scripts/Config/UserProfile/school.sh @@ -1,6 +1,6 @@ #!/bin/bash # Install JetBrains Stuff -dir="${BASH_SOURCE%/*}"; -softwareRoot="$dir/../../Software"; -source "$dir/personal.sh"; -source "$softwareRoot/JetBrains/install-toolbox.sh"; +pushd "${BASH_SOURCE%/*}"; +source "./personal.sh"; +source "../../Software/JetBrains/install-toolbox.sh"; +popd; diff --git a/scripts/Devices/SurfaceBook2/Setup/install.sh b/scripts/Devices/SurfaceBook2/Setup/install.sh index c414fc46..5b174ba8 100755 --- a/scripts/Devices/SurfaceBook2/Setup/install.sh +++ b/scripts/Devices/SurfaceBook2/Setup/install.sh @@ -1,8 +1,8 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -deviceRoot="$dir/../.."; +pushd "${BASH_SOURCE%/*}"; # Install surface-linux -source "$deviceRoot/Surface/LinuxSurface/install.sh"; -source "$deviceRoot/SurfaceBook2/Camera/install.sh"; -# source "$deviceRoot/SurfaceBook2/SecureBoot/install.sh"; +source "../../Surface/LinuxSurface/install.sh"; +source "../../SurfaceBook2/Camera/install.sh"; +# source "../../SurfaceBook2/SecureBoot/install.sh"; +popd; diff --git a/scripts/OS/PopOS/install.sh b/scripts/OS/PopOS/install.sh index 6c73baa5..35505b59 100755 --- a/scripts/OS/PopOS/install.sh +++ b/scripts/OS/PopOS/install.sh @@ -1,3 +1,4 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -source "$dir/../../Config/GnomeExtensions/install.sh"; +pushd "${BASH_SOURCE%/*}"; +source "../../Config/GnomeExtensions/install.sh"; +popd; diff --git a/scripts/Software/Collections/personal.sh b/scripts/Software/Collections/personal.sh index 5792f352..1ceb8df9 100755 --- a/scripts/Software/Collections/personal.sh +++ b/scripts/Software/Collections/personal.sh @@ -1,34 +1,34 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; +pushd "${BASH_SOURCE%/*}"; scriptRoot="$dir/../.."; utilRoot="$scriptRoot/Scripts"; deviceRoot="$scriptRoot/Devices"; softwareRoot="$scriptRoot/Software"; configRoot="$scriptRoot/Config"; -source "$softwareRoot/rclone/install.sh"; +source "../../Software/rclone/install.sh"; # Install Brave -source "$softwareRoot/Brave/install-stable.sh"; -source "$softwareRoot/Brave/install-beta.sh"; -source "$softwareRoot/Brave/install-nightly.sh"; -source "$softwareRoot/Brave/install-extensions.sh"; -source "$softwareRoot/Google Chrome/install.sh"; +source "../../Software/Brave/install-stable.sh"; +source "../../Software/Brave/install-beta.sh"; +source "../../Software/Brave/install-nightly.sh"; +source "../../Software/Brave/install-extensions.sh"; +source "../../Software/Google Chrome/install.sh"; # Install further software -source "$softwareRoot/git/install.sh"; -source "$softwareRoot/logo-ls/install.sh"; -source "$softwareRoot/VSCodium/install.sh"; -source "$softwareRoot/Visual Studio Code/install.sh"; -source "$softwareRoot/Node.js/install.sh"; -source "$softwareRoot/Python/install.sh"; -source "$softwareRoot/tea/install.sh"; -source "$softwareRoot/Godot/install.sh"; -source "$softwareRoot/Virtual Machine Manager/install.sh"; -source "$softwareRoot/Woodpecker CLI/install.sh"; +source "../../Software/git/install.sh"; +source "../../Software/logo-ls/install.sh"; +source "../../Software/VSCodium/install.sh"; +source "../../Software/Visual Studio Code/install.sh"; +source "../../Software/Node.js/install.sh"; +source "../../Software/Python/install.sh"; +source "../../Software/tea/install.sh"; +source "../../Software/Godot/install.sh"; +source "../../Software/Virtual Machine Manager/install.sh"; +source "../../Software/Woodpecker CLI/install.sh"; # Install General Packages from APT -source "$softwareRoot/common-apt/install.sh"; +source "../../Software/common-apt/install.sh"; # Install other flatpaks flatpak install -y flathub com.bitwarden.desktop; @@ -39,3 +39,4 @@ flatpak install -y flathub com.github.wwmm.easyeffects; flatpak install -y flathub ch.threema.threema-web-desktop; flatpak install -y flathub app.ytmdesktop.ytmdesktop; flatpak install -y flathub com.github.tchx84.Flatseal; +popd; diff --git a/scripts/Software/Collections/school.sh b/scripts/Software/Collections/school.sh index f336da02..4c22310a 100755 --- a/scripts/Software/Collections/school.sh +++ b/scripts/Software/Collections/school.sh @@ -1,11 +1,11 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -softwareRoot="$dir/.."; -source "$dir/personal.sh"; +pushd "${BASH_SOURCE%/*}"; +source "./personal.sh"; -source "$softwareRoot/Java/install.sh"; -source "$softwareRoot/cloudflared/install.sh"; +source "../Java/install.sh"; +source "../cloudflared/install.sh"; # Install other flatpaks flatpak install -y flathub com.github.xournalpp.xournalpp; flatpak install -y flathub com.github.flxzt.rnote; +popd; diff --git a/scripts/Software/Java/install.sh b/scripts/Software/Java/install.sh index c89eed2b..32dd1628 100755 --- a/scripts/Software/Java/install.sh +++ b/scripts/Software/Java/install.sh @@ -4,7 +4,7 @@ if [ ! "$UID" -eq 0 ] then sudo bash "$BASH_SOURCE"; curl -s "https://get.sdkman.io" | bash; - source "$HOME/.sdkman/bin/sdkman-init.sh"; + source "~/.sdkman/bin/sdkman-init.sh"; sdk install gradle 7.5.1; else apt install -y wget apt-transport-https; diff --git a/scripts/Software/Node.js/install.sh b/scripts/Software/Node.js/install.sh index 8d114b5a..76b7bbe0 100755 --- a/scripts/Software/Node.js/install.sh +++ b/scripts/Software/Node.js/install.sh @@ -1,6 +1,7 @@ #!/bin/bash export NVS_HOME="$HOME/.nvs"; git clone https://github.com/jasongin/nvs "$NVS_HOME"; +# shellcheck source=~/.nvs/nvs.sh . "$NVS_HOME/nvs.sh" install; bash -c 'exec bash -c "nvs add latest"'; bash -c 'exec bash -c "nvs link latest"'; diff --git a/scripts/Software/Python/install.sh b/scripts/Software/Python/install.sh index 83144dda..ea35a9d2 100755 --- a/scripts/Software/Python/install.sh +++ b/scripts/Software/Python/install.sh @@ -1,4 +1,5 @@ #!/bin/bash -dir="${BASH_SOURCE%/*}"; -source "$dir/setup.sh"; -source "$dir/pyenv.sh"; +pushd "${BASH_SOURCE%/*}"; +source "./setup.sh"; +source "./pyenv.sh"; +popd;