-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
41 lines (39 loc) · 1.48 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: 'fish-shop/install-plugin-manager'
description: 'A GitHub action for installing a fish shell plugin manager'
branding:
icon: 'arrow-down'
color: 'green'
inputs:
plugin-manager:
description: 'The name of the fish shell plugin manager to install'
required: true
runs:
using: "composite"
steps:
- name: Install plugin manager
env:
PLUGIN_MANAGER: ${{ inputs.plugin-manager }}
run: |
set -gx TERM xterm-256color
set plugin_manager (string escape --no-quoted -- $PLUGIN_MANAGER)
switch $plugin_manager
case fisher
if test (type -q fisher) $status -ne 0
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
fisher install jorgebucaran/fisher
else
echo "Plugin manager already installed: fisher"
end
case oh-my-fish
if test (type -q omf) $status -ne 0
curl -L https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > omf-install
chmod u+x omf-install
./omf-install -y --noninteractive
rm -f omf-install
else
echo "Plugin manager already installed: oh-my-fish"
end
case '*'
echo "Unrecognised plugin manager: '$plugin_manager'" >&2; and exit 1
end
shell: fish {0}