sh Ubuntu Swift-2.2安装程序

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Ubuntu Swift-2.2安装程序相关的知识,希望对你有一定的参考价值。

#!/bin/bash

TARBALL="swift-2.2.tar.gz"
TARBALL_SIG="swift-2.2.tar.gz.sig"
SWIFT_TARBALL_URL="https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz"
SWIFT_TARBALL_SIG_URL="https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz.sig"
DESTDIR="/opt/swift-2.2"

if [ ! -e "$TARBALL" ]; then
    wget "$SWIFT_TARBALL_URL" -O "$TARBALL"
fi

if [ ! -e "$TARBALL_SIG" ]; then
    wget "$SWIFT_TARBALL_SIG_URL" -O "$TARBALL_SIG"
fi

gpg --keyserver hkp://pool.sks-keyservers.net \
      --recv-keys \
      '7463 A81A 4B2E EA1B 551F  FBCF D441 C977 412B 37AD' \
      '1BE1 E29A 084C B305 F397  D62A 9F59 7F4D 21A5 6D5F'
gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift

LANG=C gpg --verify swift-2.2.tar.gz.sig | grep "BAD signature"
if [ $? -eq 0 ]; then
    echo "Bad signature, stop to install."
    exit -1
fi

if [ ! -e "$DESTDIR" ]; then
    tar xf $TARBALL
    sudo mv swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04 "$DESTDIR"
fi
sudo apt-get install clang

echo
echo "If you are using bash, please add the following text in ~/.bashrc"
echo "If you are using zsh, the file is ~/.zshrc"
echo
echo "export PATH=$DESTDIR/usr/bin:\${PATH}"
echo

exit 0

以上是关于sh Ubuntu Swift-2.2安装程序的主要内容,如果未能解决你的问题,请参考以下文章

我可以在 ubuntu 中安装 xcode 吗?

sh 安装Ubuntu内核更新实用程序(Ukuu)

ubuntu14.10上安装coreseek不成功,运行buildconf.sh不能生成configure

如何通过PPA为Ubuntu安装Nvidia驱动 61 系统极客

sh 在Ubuntu上安装和设置NO-IP动态IP更新程序引擎的脚本

sh libvips 7.42.x跨平台简单安装程序脚本(支持OSX,Debian,Ubuntu,CentOS,Fedora,Amazon Linux)