sh 在新的OSX机器上安装我想要的东西的脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在新的OSX机器上安装我想要的东西的脚本相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env bash
# 
# Bootstrap script for setting up a new OSX machine

# check to make sure we are an admin
if ! groups username | grep -q -w admin; 
then 
    echo "You need to have adminsitrative priveleges to run this script" 
    exit 1
fi

echo "Starting bootstrapping"

# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
    echo "Installing homebrew..."
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

# Update homebrew recipes
brew update

# Declare packages to install

PACKAGES=(
    ant
    dependency-check
    freetype
    gdb
    gdbm
    gettext
    git
    hub
    icu4c
    imagemagick
    jpeg
    libidn2
    libpng
    libtiff
    libtool
    libunistring
    little-cms2
    maven
    mongodb
    neofetch
    nginx
    node@10
    openjpeg
    openssl
    pcre
    pcre2
    postgresql
    python
    python@2
    readline
    redis
    rethinkdb
    screenresolution
    sonar-scanner
    sqlite
    telnet
    tree
    webp
    wget
    xz
    youtube-dl
    zsh-autosuggestions
)

echo "Installing packages..."
brew install ${PACKAGES[@]}

echo "Cleaning up..."
brew cleanup

echo "Installing Homebrew Cask..."
brew tap caskroom/cask

CASKS=(
    android-studio
    appcleaner
    atom
    bettertouchtool
    brave-browser
    caffeine
    clion
    cyberduck
    dbeaver-community
    diffmerge
    docker
    firefox
    gitkraken
    google-chrome
    imageoptim
    intellij-idea-ce
    iterm2
    macdown
    mongodb-compass-community
    mysqlworkbench
    opera
    pycharm-ce
    slack
    sourcetree
    spotify
    sublime-text
    the-unarchiver
    virtualbox
    visual-studio-code
    vlc
    webstorm
    xampp
)

echo "Installing cask apps..."
brew cask install ${CASKS[@]}

echo "Installing brew-cask-upgrade..."
brew tap buo/cask-upgrade

echo "Upgrading any outdated casks..."
brew cu --all -y

echo "Installing global npm packages..."
npm install apidoc bower browserify cloc create-react-app electron eslint express-generator git-open npm pm2 pure-prompt webpack yarn -g

echo "Installing oh-my-zsh! and making zsh the default shell"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s $(which zsh)

以上是关于sh 在新的OSX机器上安装我想要的东西的脚本的主要内容,如果未能解决你的问题,请参考以下文章

sh 这是我在新的ubuntu机器上运行的第一个命令,用于设置一个简单的防火墙,只允许我想要的。

sh 在新的Ubuntu 14.04 Amazon EC2实例上安装Sentry(http://getsentry.com)+ Redis的基本安装脚本

sh 在新的macOS上设置/安装的事情

sh 在新的macOS上设置/安装的事情

sh 如何在新的Ubuntu安装上构建比特币(0.13)

如何配置 Chef Solo 以在新的 Vagrant 机器上安装 Nginx?