-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.fish
More file actions
executable file
·53 lines (39 loc) · 1.14 KB
/
setup.fish
File metadata and controls
executable file
·53 lines (39 loc) · 1.14 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (c) 2023 DMascot
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
source "$PWD/lib/unix/fish.fish"
function is_prerequisites_satisfied --description "Check Prerequisites"
if command -q git
echo "git found....OK"
else
echo "Install git command!"
false
end
if test -f "$HOME/.config/fish/functions/bass.fish"
echo "bass found....OK"
else
echo "Install bass from https://github.com/edc/bass"
false
end
end
function setup --description "run setup"
if make_dir $DEST_CONFIG_DIR
echo "Configuring git prompt"
config_gitprompt
echo "Installing and configuring pyenv"
install_pyenv
echo "Installing and configuring nvm"
install_nvm
echo "source $DEST_CONFIG_DIR/git_prompt.fish" > $FISHRC
echo "source $DEST_CONFIG_DIR/pyenv.fish" >> $FISHRC
echo "source $DEST_CONFIG_DIR/nvm.fish" >> $FISHRC
echo "source $FISHRC" >> $HOME/.config/fish/config.fish
true
else
false
end
end
if is_prerequisites_satisfied
setup
end