From ecb925a6fdd2a1fa998760f088cbcc5341302f9a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 16 Jul 2024 03:36:51 +0200 Subject: [PATCH] Replace `aliae` config with default `bash` profile --- scripts/Common/OS/install.fish | 1 + scripts/Common/Software/aliae/aliae.yml | 6 ------ scripts/Common/Software/bash/main.fish | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 scripts/Common/Software/bash/main.fish diff --git a/scripts/Common/OS/install.fish b/scripts/Common/OS/install.fish index 7b9ce811..e15d9107 100644 --- a/scripts/Common/OS/install.fish +++ b/scripts/Common/OS/install.fish @@ -35,6 +35,7 @@ if [ (id -u) -eq 0 ] userdel -r "$name" else copyNixConfig + source "$dir/../Software/bash/main.fish" runHook initialize || true runHook installDrivers || true runHook installOS || true diff --git a/scripts/Common/Software/aliae/aliae.yml b/scripts/Common/Software/aliae/aliae.yml index 8e30bb41..1e381147 100644 --- a/scripts/Common/Software/aliae/aliae.yml +++ b/scripts/Common/Software/aliae/aliae.yml @@ -6,12 +6,6 @@ env: value: '{{ if eq .OS "windows" }}{{ .Home }}/Nextcloud/.omp{{ else }}/usr/local/share/oh-my-posh/themes{{ end }}/manuel.omp.json' path: [] script: - - value: | - while IFS= read -r -d '' file; - do - . "$file"; - done < <(find {/etc,~/.config}/bash/conf.d/* -print0 2> /dev/null); - if: match .Shell "bash" - value: | # Profile Files $profileRoot = Split-Path -Parent $PROFILE; diff --git a/scripts/Common/Software/bash/main.fish b/scripts/Common/Software/bash/main.fish new file mode 100644 index 00000000..07f4356b --- /dev/null +++ b/scripts/Common/Software/bash/main.fish @@ -0,0 +1,23 @@ +#!/bin/env fish +begin + set -l dir (status dirname) + source "$dir/../../Scripts/software.fish" + + function installSW + configureSW + end + + function configureSW -V dir + begin + printf %s\n \ + "" \ + "# profile" \ + "while IFS= read -r -d '' file;" \ + "do" \ + 'source "$file";' \ + 'done < <(find {/etc,~/.config}/bash/conf.d/* -print0 2> /dev/null);' + end | sudo tee -a /etc/skel/.bashrc &> /dev/null + end + + runInstaller $argv +end