美文网首页
setup_build_tools.sh

setup_build_tools.sh

作者: 浩然69 | 来源:发表于2018-01-23 12:23 被阅读0次

    这份代码主要是安装必要的依赖和工具。主要有一下这个几个工具。

    1、XCode Command Line Tools

    2、Homebrew 一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。

    3、python

    4、virtualenv 创建一个独立的Python环境,单独的应用使用单独的环境。

    5、imagemagick 是一个免费的创建、编辑、合成图片的软件

    6、Carthage 管理三方框架依赖

    7、fastlane 简化和自动化 App 发布或部署的过程

    #!/bin/sh

    #

    # Install all the required dependencies for building and deploying Firefox for iOS

    # Assumes you already have git otherwise you wouldn't have this setup script

    #为了编写和部署firefox-ios,安装所有的必备的依赖。

    # run ./setup.sh from the command line to run

    #终端输入run ./setup.sh 运行文件

    #

    # Check if XCode Command Line Tools are installed

    #

    which -s xcode-select

    if [[ $? != 0 ]] ; then

    echo "Installing XCode Command Line Tools"

    # Install XCode Command Line Tools

    xcode-select --install

    else

    echo "XCode Command Line Tools already installed"

    fi

    #

    # Check if Homebrew is installed

    # Homebrew一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。

    #

    which -s brew

    if [[ $? != 0 ]] ; then

        # Install Homebrew

    echo "Installing Homebrew"

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

    else

    echo "Homebrew already installed"

    fi

    #

    # Check if python is installed

    #

    if [ ! -e $(python -c 'from distutils.sysconfig import get_makefile_filename as m; print m()') ]; then

    # Install python

    echo "Installing python"

    brew install python

    else

    echo "python already installed"

    fi

    #

    # Check if virtualenv is installed

    #virtualenv创建一个独立的Python环境,单独的应用使用单独的环境。

    which -s virtualenv

    if [[ $? != 0 ]] ; then

        # Install virtualenv

    echo "Installing vitualenv"

        pip install virtualenv

    else

    echo "virtualenv already installed"

    fi

    if [ ! -d /usr/local/Cellar/imagemagick ] ; then

    echo "installing imagemagick"

    brew install imagemagick

    else

    echo "imagemagick already installed"

    fi

    #

    # Check is Carthage is installed

    #Carthage用来管理三方框架依赖

    which -s carthage

    if [[ $? != 0 ]] ; then

        # Install Carthage

    echo "Installing Carthage"

        brew install carthage

    else

    echo "Carthage already installed"

    fi

    #

    # Check if fastlane is installed 简化和自动化 App 发布或部署的过程

    #fastlane 简化和自动化 App 发布或部署的过程

    which -s fastlane

    if [[ $? != 0 ]] ; then

        # Install fastlane

    echo "Installing fastlane."

        sudo gem install fastlane

        fastlane init

    else

    echo "fastlane already installed"

    fi

    相关文章

      网友评论

          本文标题:setup_build_tools.sh

          本文链接:https://www.haomeiwen.com/subject/srjlaxtx.html