From ecef03197a7d64f5ad1a502a301dd0f5f12c1f84 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 30 Mar 2024 17:50:32 +0100 Subject: [PATCH] fix minor issues --- arch.sh | 5 ++--- arch_wsl.sh | 6 +++--- meta.sh | 24 ++++++++++++++---------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/arch.sh b/arch.sh index 4ea649e..84936c1 100644 --- a/arch.sh +++ b/arch.sh @@ -11,7 +11,7 @@ fi cd "$(dirname "$0")" # change script directory -main() { +function main { # === Variables == local repo repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main @@ -30,7 +30,7 @@ main() { # === Global OS configuration set-up == # shellcheck disable=SC1091 - source meta.sh + source meta.sh ${repo} # === AUR packages == @@ -61,7 +61,6 @@ main() { # === Fish == # Custom Arch configuration - wget -q ${repo}/.config/fish/config_arch.fish -O "$HOME"/.config/fish/config.fish curl -s ${repo}/.config/fish/conf.d/abbr_arch.fish >> "$HOME"/.config/fish/conf.d/abbr.fish curl -s ${repo}/.config/fish/conf.d/alias_arch.fish >> "$HOME"/.config/fish/conf.d/alias.fish diff --git a/arch_wsl.sh b/arch_wsl.sh index 730f86a..cff1a23 100644 --- a/arch_wsl.sh +++ b/arch_wsl.sh @@ -11,7 +11,7 @@ fi cd "$(dirname "$0")" # change script directory -main() { +function main { # === Variables == local repo repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main @@ -43,7 +43,7 @@ main() { # === Global OS configuration set-up == # shellcheck disable=SC1091 - source meta.sh + source meta.sh ${repo} # === Remove SU password == @@ -77,7 +77,7 @@ main() { # === Fish == # Custom WSL configuration - wget -q ${repo}/.config/fish/config_wsl.fish -O "$HOME"/.config/fish/config.fish + curl -s ${repo}/.config/fish/config_wsl.fish >> "$HOME"/.config/fish/config.fish curl -s ${repo}/.config/fish/conf.d/abbr_wsl.fish >> "$HOME"/.config/fish/conf.d/abbr.fish curl -s ${repo}/.config/fish/conf.d/alias_wsl.fish >> "$HOME"/.config/fish/conf.d/alias.fish diff --git a/meta.sh b/meta.sh index 221f133..b810508 100644 --- a/meta.sh +++ b/meta.sh @@ -11,10 +11,10 @@ fi cd "$(dirname "$0")" # change script directory -main() { +function main { # === Variables == local repo - repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main + repo=$1 # === Package manager == @@ -74,13 +74,15 @@ main() { fish -c "set fish_color_comment 5c6773" # custom comment color # Fish prompt rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null ||: - wget -q ${repo}/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/ + wget -q "${repo}"/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/ # EZA colors fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'" + # Add configuration + wget -q "${repo}"/.config/fish/config.fish -O "$HOME"/.config/fish/config.fish # Add abbreviations - wget -q ${repo}/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish + wget -q "${repo}"/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish # Add aliases - wget -q ${repo}/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish + wget -q "${repo}"/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish # === Default editor == @@ -89,7 +91,7 @@ main() { # === Micro configuration == mkdir -p "$HOME"/.config/micro - wget -q --show-progress ${repo}/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json + wget -q --show-progress "${repo}"/.config/micro/settings.json -O "$HOME"/.config/micro/settings.json micro -plugin install detectindent @@ -108,6 +110,7 @@ main() { # # Add to path # fish -c "set -Uax LD_LIBRARY_PATH /usr/local/lib" + # === tldr == fish -c "tldr --update" # Fish completion @@ -127,11 +130,11 @@ main() { # === Bat config == mkdir -p "$HOME"/.config/bat - wget -q --show-progress ${repo}/.config/bat/config -O "$HOME"/.config/bat/config + wget -q --show-progress "${repo}"/.config/bat/config -O "$HOME"/.config/bat/config # === Git == - wget -q ${repo}/dotfiles/.gitconfig -O "$HOME"/.gitconfig + wget -q "${repo}"/dotfiles/.gitconfig -O "$HOME"/.gitconfig # === Python == @@ -147,14 +150,15 @@ main() { opam install -y \ utop ocaml-lsp-server ocamlformat core menhir pprint sexplib \ ppx_sexp_conv cohttp-lwt-unix dotenv twostep lwt_ssl alcotest ppx_deriving - wget -q ${repo}/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat + wget -q "${repo}"/dotfiles/.ocamlformat -O "$HOME"/.ocamlformat # Add Opam packages from OCaml mkdir -p "$HOME"/.opam/default/bin fish -c "fish_add_path $HOME/.opam/default/bin ||:" # === Clangd == - wget -q ${repo}/dotfiles/.clang-format -O "$HOME"/.clang-format + wget -q "${repo}"/dotfiles/.clang-format -O "$HOME"/.clang-format + # === Perl == # Add perl packages to path