-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.sh
executable file
·30 lines (20 loc) · 1.54 KB
/
code.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
#!/bin/bash
echo -e "
██████╗ ███████╗██╗ ██╗ ██╗██╗ ██╗██╗ █████╗ ██████╗
██╔═══██╗██╔════╝██║ ██║ ██╔╝██║ ██║██║██╔══██╗██╔══██╗
██║ ██║█████╗ ██║ █████╔╝ ███████║██║███████║██████╔╝
██║ ██║██╔══╝ ██║ ██╔═██╗ ██╔══██║██║██╔══██║██╔══██╗
╚██████╔╝███████╗███████╗██║ ██╗██║ ██║██║██║ ██║██║ ██║
╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ \n"
echo "Create the /usr/local/bin directory in your user's home folder if it doesn't exist \n"
mkdir -p ~/usr/local/bin
sleep 1
echo "Create a symbolic link to the code executable in the ~/usr/local/bin directory \n"
ln -s "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" ~/usr/local/bin/code
sleep 1
echo "Add the ~/usr/local/bin directory to your PATH variable \n"
echo 'export PATH="$HOME/usr/local/bin:$PATH"' >> ~/.zshrc
sleep 1
echo "Reload the shell configuration file \n";
source ~/.zshrc
echo "just completed. if any error, please reload the terminal."