From 3140843098db9758ac087fca85a1afbca3aea700 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 13 Sep 2024 15:10:29 +0200 Subject: [PATCH] Chain all commands --- scripts/Arch/OS/install.fish | 10 +-- scripts/Arch/Scripts/deploy.fish | 103 ++++++++++++++++--------------- scripts/Common/OS/install.fish | 4 +- 3 files changed, 59 insertions(+), 58 deletions(-) diff --git a/scripts/Arch/OS/install.fish b/scripts/Arch/OS/install.fish index 5b034f3b..5a17c9f0 100755 --- a/scripts/Arch/OS/install.fish +++ b/scripts/Arch/OS/install.fish @@ -12,12 +12,12 @@ begin or exit sudo systemctl enable --now nix-daemon - source "$dir/../Scripts/software.fish" - source "$dir/../Software/base-devel/main.fish" - source "$dir/../Software/pacman/main.fish" - source "$dir/../Software/yay/main.fish" + and source "$dir/../Scripts/software.fish" + and source "$dir/../Software/base-devel/main.fish" + and source "$dir/../Software/pacman/main.fish" + and source "$dir/../Software/yay/main.fish" - yayinst \ + and yayinst \ pacman-contrib \ powershell-bin end diff --git a/scripts/Arch/Scripts/deploy.fish b/scripts/Arch/Scripts/deploy.fish index c22a11a9..42951bdb 100644 --- a/scripts/Arch/Scripts/deploy.fish +++ b/scripts/Arch/Scripts/deploy.fish @@ -32,21 +32,21 @@ function deploySoftware -d "Deploys a the specified software action" -a action sl \ rar - sudo pkgfile --update + and sudo pkgfile --update end - source "$dir/../../Common/Software/bash/main.fish" $action - source "$dir/../Software/openssh/main.fish" $action - source "$dir/../Software/vim/main.fish" $action - source "$dir/../Software/git/main.fish" $action - source "$dir/../Software/zoxide/main.fish" $action - source "$dir/../Software/logo-ls/main.fish" $action + and source "$dir/../../Common/Software/bash/main.fish" $action + and source "$dir/../Software/openssh/main.fish" $action + and source "$dir/../Software/vim/main.fish" $action + and source "$dir/../Software/git/main.fish" $action + and source "$dir/../Software/zoxide/main.fish" $action + and source "$dir/../Software/logo-ls/main.fish" $action # GRUB Shenanigans - if that's not essential I don't know what is! - source "$dir/../Software/minegrub-theme/main.fish" $action + and source "$dir/../Software/minegrub-theme/main.fish" $action end - if collectionActive common + and if collectionActive common if $isInstall yayinst \ tldr \ @@ -54,14 +54,14 @@ function deploySoftware -d "Deploys a the specified software action" -a action terminal-parrot end - source "$dir/../Software/aliae/main.fish" $action + and source "$dir/../Software/aliae/main.fish" $action end - if collectionActive desktopExperience + and if collectionActive desktopExperience source "$dir/../Software/KDE/main.fish" $action - source "$dir/../Software/sddm/main.fish" $action + and source "$dir/../Software/sddm/main.fish" $action - if $isInstall + and if $isInstall yayinst \ maliit-keyboard \ dconf-editor \ @@ -70,20 +70,20 @@ function deploySoftware -d "Deploys a the specified software action" -a action ) xdg-desktop-portal-gtk # Fonts - yayinst \ + and yayinst \ ttf-cascadia-code-nerd \ ttf-ms-win11-auto \ otf-cascadia-code \ ttf-droid # Password Management - yayinst \ + and yayinst \ bitwarden \ keepass \ keepassxc # Tools - yayinst \ + and yayinst \ android-tools \ blackbox-terminal \ cpu-x \ @@ -93,32 +93,32 @@ function deploySoftware -d "Deploys a the specified software action" -a action linux-wifi-hotspot # Remote Access - yayinst \ + and yayinst \ remmina ( # RDP support for Remmina ) freerdp # Creativity - yayinst \ + and yayinst \ gimp \ inkscape # Office stuff - yayinst \ + and yayinst \ libreoffice-fresh \ naps2-bin \ pdfarranger \ protonmail-bridge \ thunderbird - yayinst \ + and yayinst \ texlive \ texlive-langgerman # Virtualization - yayinst propertree-git # mac .plist config file editor + and yayinst propertree-git # mac .plist config file editor - if collectionActive school + and if collectionActive school yayinst \ teams-for-linux \ xournalpp-git \ @@ -127,43 +127,43 @@ function deploySoftware -d "Deploys a the specified software action" -a action end # Internet Access - source "$dir/../Software/Firefox/main.fish" $action - source "$dir/../Software/brave/main.fish" $action - source "$dir/../Software/Pennywise/main.fish" $action + and source "$dir/../Software/Firefox/main.fish" $action + and source "$dir/../Software/brave/main.fish" $action + and source "$dir/../Software/Pennywise/main.fish" $action # Virtualization - source "$dir/../Software/waydroid/main.fish" $action - source "$dir/../Software/Virtual Machine Manager/main.fish" $action + and source "$dir/../Software/waydroid/main.fish" $action + and source "$dir/../Software/Virtual Machine Manager/main.fish" $action - if collectionActive coding + and if collectionActive coding if $isInstall yayinst \ devdocs-desktop \ godot-mono end - source "$dir/../Software/vscode/main.fish" $action + and source "$dir/../Software/vscode/main.fish" $action end end - if collectionActive server + and if collectionActive server else if $isInstall # Energy Saving yayinst power-profiles-daemon - sudo systemctl enable --now power-profiles-daemon + and sudo systemctl enable --now power-profiles-daemon # Networking - yayinst \ + and yayinst \ networkmanager-openvpn \ networkmanager-openconnect \ proton-vpn-gtk-app \ protonvpn-cli-community end - if collectionActive common + and if collectionActive common if $isInstall - yayinst \ + and yayinst \ img2pdf \ numbat-bin \ nvtop \ @@ -171,11 +171,11 @@ function deploySoftware -d "Deploys a the specified software action" -a action tnef end - source "$dir/../Software/IcedTea/main.fish" $action + and source "$dir/../Software/IcedTea/main.fish" $action end end - if collectionActive media && $isInstall + and if collectionActive media && $isInstall yayinst \ ytmdesktop-bin \ netflix \ @@ -185,18 +185,19 @@ function deploySoftware -d "Deploys a the specified software action" -a action nuclear-player-bin \ audius-client-bin - yayinst tidal-dl || true + and yayinst tidal-dl || true end - if collectionActive fileSync + and if collectionActive fileSync if $isInstall yayinst nextcloud-client end - source "$dir/../Software/rclone/main.fish" $action + and source "$dir/../Software/rclone/main.fish" $action end - if collectionActive socialMedia + and if collectionActive socialMedia && $isInstall + yayinst \ signal-desktop \ vesktop-bin @@ -205,21 +206,21 @@ function deploySoftware -d "Deploys a the specified software action" -a action yes y | yayinst nodejs end - if collectionActive productivity && $isInstall + and if collectionActive productivity && $isInstall yayinst \ anki-bin end - if collectionActive school && $isInstall + and if collectionActive school && $isInstall yayinst \ jdk17-temurin \ gradle \ jetbrains-toolbox - source "$dir/../../Common/Software/udev/ct-board.fish" + and source "$dir/../../Common/Software/udev/ct-board.fish" end - if collectionActive coding + and if collectionActive coding if $isInstall yayinst \ archiso \ @@ -234,10 +235,10 @@ function deploySoftware -d "Deploys a the specified software action" -a action ) esbonio end - source "$dir/../Software/n/main.fish" $action + and source "$dir/../Software/n/main.fish" $action end - if collectionActive python + and if collectionActive python if $isInstall yayinst \ python \ @@ -245,10 +246,10 @@ function deploySoftware -d "Deploys a the specified software action" -a action python-pipenv end - source "$dir/../Software/pyenv/main.fish" $action + and source "$dir/../Software/pyenv/main.fish" $action end - if collectionActive gaming + and if collectionActive gaming if $isInstall yayinst \ steam \ @@ -258,13 +259,13 @@ function deploySoftware -d "Deploys a the specified software action" -a action supertux \ gamepad-tool-bin - flatpak install -y flathub com.usebottels.bottles + and flatpak install -y flathub com.usebottels.bottles end - source "$dir/../Software/Lutris/main.fish" $action + and source "$dir/../Software/Lutris/main.fish" $action end - if collectionActive essential && $isInstall + and if collectionActive essential && $isInstall yayinst bb end end diff --git a/scripts/Common/OS/install.fish b/scripts/Common/OS/install.fish index f89624d3..914ab350 100755 --- a/scripts/Common/OS/install.fish +++ b/scripts/Common/OS/install.fish @@ -36,9 +36,9 @@ else end runHook initialize || true - runHook installOS || true + and runHook installOS || true - runHook addUsers || begin + and runHook addUsers || begin source "$dir/users.fish" end