关于重装系统好初始化环境的 Shell 脚本

本贴最后更新于 1833 天前,其中的信息可能已经水流花落

囊括了 jdk,go 啊(go.zip)如果没有的话,可以放个假的,SDKS 同理。
还有日常工作需要的一些个工具,最后重新生成个.ssh 文件打印出来,粘进 github,完美!
前提是 brew 下包不卡壳.

main

#!/usr/bin/env bash

# create SDKS
unzip ./Sdks.zip
cp -rf ./Sdks $HOME/Sdks
rm -rf ./Sdks.zip

# HOMEBREW
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# WGET
brew install wget

# JAVA
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
brew cask install adoptopenjdk12
cat ./java.profile >> $HOME/.bash_profile
brew install maven
brew install gradle
cat ./davinci.profile >> $HOME/.bash_profile

# GO
brew install go
unzip ./go.zip 
cp -rf go $HOME/go
rm ./go.zip
cat ./go.profile >> $HOME/.bash_profile
go get -u github.com/sourcegraph/go-langserver

# JAVASCRIPT
brew install node
brew install yarn
npm install -g nrm
npm install -g prettier
npm install -g typescript
npm install -g @angular/cli@latest
npm install -g html-languageserver
npm install -g bash-language-server
npm install -g vscode-css-languageserver-bin
npm install -g typescript-language-server
npm install -g javascript-typescript-langserver
npm install -g vue-language-server

# LUA
brew install lua

# PYTHON
brew install python
pip3 install pyls
pip3 install --user python-language-server

#DART
brew tap dart-lang/dart
brew install dart
git clone https://github.com/flutter/flutter.git $HOME/Sdks/flutter
pub global activate dart_language_server
cat ./dart.profile >> $HOME/.bash_profile

#VIM
brew install nvim
chmod -R 777 ./spaceupdate
chmod -R 777 ./ll
./spaceupdate
cp -rf ./ll /usr/bin/ll
cp -rf ./spaceupdate /usr/bin/ll
cp -rf ./init.toml $HOME/.SpaceVim.d/init.toml

#shadowsocksx-ng
brew cask install shadowsocksx-ng

# Clients
brew cask install iterm2
brew cask install dotnet-sdk
brew cask install font-hack-nerd-font
brew cask install android-studio
brew cask install intellij-idea
brew cask install tbs-studio
brew cask install sourcetree
brew cask install wechatwebdevtools
brew cask install kindle
brew cask install licecap
brew cask install google-chrome
brew cask install qq
brew cask install tencent-lemon
brew cask install wechat
brew cask install dash
brew cask install anaconda
brew cask install neteasemusic
brew cask install docker

# sshkey
ssh-keygen -t rsa -C "harlancui@outlook.com"
cat $HOME/.ssh/id_rsa.pub

profiles

GO

export GO111MODULE=on
export GOPROXY=https://goproxy.io
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOPROXY:$GOBIN

JAVA

# JDK
export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
export JAVA_12_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home
export JAVA_HOME=$JAVA_8_HOME
alias jdk8="export JAVA_HOME=$JAVA_8_HOME"
alias jdk12="export JAVA_HOME=$JAVA_12_HOME"
export PATH=$PATH:$JAVA_HOME

DART

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export DART_HOME=$HOME/Sdks/flutter
export PATH=$PATH:$DART_HOME/bin
export PATH=$PATH:$HOME/.pub-cache/bin

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...