热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

shUbuntuSwift2.2安装程序

本文由编程笔记#小编为大家整理,主要介绍了sh Ubuntu Swift-2.2安装程序相关的知识,希望对你有一定的参考价值。
本文由编程笔记#小编为大家整理,主要介绍了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


推荐阅读
author-avatar
333
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有