-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
51 lines (37 loc) · 1.51 KB
/
run.sh
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
#!/bin/bash
# Get current user directory
CURRENT_USER_DIR=$(eval echo ~$USER)
echo $CURRENT_USER_DIR
# Get current directory
CURRENT_DIR=$(pwd)
echo $CURRENT_DIR
# VSCode
_distribute_vscode() {
echo "Distribute VSCode Settings Start..."
# Copy VSCode settings
current_vscode_path="${CURRENT_DIR}/vscode/settings.json"
vscode_path="${CURRENT_USER_DIR}/Library/Application Support/Code/User/settings.json"
cp "$current_vscode_path" "$vscode_path"
# Copy VSCode keybindings
current_vscode_keybindings_path="${CURRENT_DIR}/vscode/keybindings.json"
vscode_keybindings_path="${CURRENT_USER_DIR}/Library/Application Support/Code/User/keybindings.json"
cp "$current_vscode_keybindings_path" "$vscode_keybindings_path"
current_vscode_snappets_path="${CURRENT_DIR}/vscode/snippets"
vscode_snappets_path="${CURRENT_USER_DIR}/Library/Application Support/Code/User"
cp -r "$current_vscode_snappets_path" "$vscode_snappets_path"
echo "Distribute VSCode Settings End..."
}
# Collect Frontend Tools
_collect_frontend_tools() {
echo "Collect Frontend Tools Start..."
# find "/usr/local/lib/node_modules" -maxdepth 1 -type f -exec basename {} \; > "frontend/tools.txt"
# find "/usr/local/lib/node_modules" -maxdepth 1 -type f -o -type d > "frontend/tools.txt"
find "/usr/local/lib/node_modules" -mindepth 1 -maxdepth 1 -exec basename {} \; > "frontend/tools.txt"
echo "Collect Frontend Tools End..."
}
# Main
main() {
_distribute_vscode
_collect_frontend_tools
}
main