forked from sharkymark/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·59 lines (47 loc) · 1.71 KB
/
install.sh
File metadata and controls
executable file
·59 lines (47 loc) · 1.71 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
54
55
56
57
58
59
#!/usr/bin/env bash
echo "dotfiles repo install.sh"
echo "Copying dotfiles ..."
echo "STEP: copying .gitconfig and .gitignore_global"
cp -r ./git/.gitconfig ./git/.gitignore_global ~
PATH_CS_1="$HOME/.local/share/code-server"
PATH_CS_2="$HOME/.local/share/code-server/User"
PATH_VS_1="$HOME/Library/Application Support/Code/User"
COMMAND_S="cp ./Code/User/settings.json"
COMMAND_K="cp ./Code/User/keybindings.json"
COMMAND_T="cp ./Code/User/tasks.json"
echo "STEP: copying shell dotfiles e.g., .bashrc, .zshrc"
echo "Shell is $SHELL"
if [ "$SHELL" = "/bin/bash" ]; then
cp ./shell/bash/.bashrc $HOME/.bashrc
cp ./shell/bash/.bash_profile $HOME/.bash_profile
elif [ "$SHELL" = "/bin/zsh" ]; then
echo "Copying zshrc to $HOME"
cp ./shell/zsh/.zshrc $HOME/.zshrc
if [ "$FRAMEWORK" = "ohmyzsh" ]; then
echo "STEP: installing shell framework Oh My ZSH"
ZSH= ./shell/ohmyzsh/install.sh
fi
elif [ "$SHELL" = "/usr/local/fish" ]; then
cp ./shell/fish/config.fish $HOME/.config/fish/config.fish
else
echo "no unix shell dotfiles copied"
fi
echo "STEP: copying VS Code-related config files"
if [ -d $PATH_CS_1 ]; then
echo 'code-server directory exists (i.e., a Coder remote workspace), copying settings.json, keybindings.json, tasks.json'
if [ -d $PATH_CS_2 ]; then
echo "$PATH_CS_2 found"
else
echo "$PATH_CS_2 not found, make directory"
mkdir "$PATH_CS_1"/User
fi
$COMMAND_S $PATH_CS_2
$COMMAND_K $PATH_CS_2
$COMMAND_T $PATH_CS_2
fi
if [ -d "$PATH_VS_1" ]; then
echo 'locally-installed VS Code found, copying settings.json, keybindings.json, tasks.json'
$COMMAND_S "$PATH_VS_1"
$COMMAND_K "$PATH_VS_1"
$COMMAND_T "$PATH_VS_1"
fi