From b87524c063270d0b45d4d0dd5cde5c7a5decd916 Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Mon, 29 Jan 2024 17:23:33 -0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Volta=20->=20fish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/path.config.fish | 3 +++ node/path.zsh | 3 --- node/volta.config.fish | 3 +++ node/{volta.sh => volta.fish} | 8 +++----- node/volta.zsh | 3 --- script/dot.fish | 10 ++++++++++ 6 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 node/path.config.fish delete mode 100644 node/path.zsh create mode 100644 node/volta.config.fish rename node/{volta.sh => volta.fish} (51%) delete mode 100644 node/volta.zsh diff --git a/node/path.config.fish b/node/path.config.fish new file mode 100644 index 0000000..85e9f36 --- /dev/null +++ b/node/path.config.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +fish_add_path "$HOME/.volta/bin" diff --git a/node/path.zsh b/node/path.zsh deleted file mode 100644 index d5848fb..0000000 --- a/node/path.zsh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -export PATH="$HOME/.volta/bin:$PATH" diff --git a/node/volta.config.fish b/node/volta.config.fish new file mode 100644 index 0000000..8307b8d --- /dev/null +++ b/node/volta.config.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +set -gx VOLTA_HOME "$HOME/.volta" diff --git a/node/volta.sh b/node/volta.fish similarity index 51% rename from node/volta.sh rename to node/volta.fish index b2d20a4..ef46fcb 100755 --- a/node/volta.sh +++ b/node/volta.fish @@ -1,8 +1,6 @@ -#!/usr/bin/env bash -# vim:set ft=bash: +#!/usr/bin/env fish -cd "$(dirname "${BASH_SOURCE[0]}")" \ - && source "../script/utils.sh" +source "$DOT/script/utils.fish" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -10,4 +8,4 @@ print_title "Volta & Node.js" execute "curl https://get.volta.sh | bash -s -- --skip-setup" "Volta" -execute ". $DOT/node/path.zsh && volta install node" "Node.js LTS" +execute ". $DOT/node/path.config.fish && volta install node" "Node.js LTS" diff --git a/node/volta.zsh b/node/volta.zsh deleted file mode 100644 index dcaf12b..0000000 --- a/node/volta.zsh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -export VOLTA_HOME="$HOME/.volta" diff --git a/script/dot.fish b/script/dot.fish index 30069bb..4b586c9 100755 --- a/script/dot.fish +++ b/script/dot.fish @@ -112,6 +112,16 @@ end # Main # ################################################################################ +# Ensure npm is available. + +"$DOT/node/volta.fish" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +set_os_prefs + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + print_title "Installers" find . -name install.fish | while read installer; fish -c "$installer"; end