SUDO="sudo" SW_BUILD_DIR=~/swift-source if [ "/root" == $HOME ]; then SUDO="" fi $SUDO dnf groupinstall -y --best --allowerasing "C Development Tools and Libraries" $SUDO dnf install -y --best --allowerasing \ git-all \ cmake \ ninja-build \ binutils \ libtool \ clang \ re2c \ uuid-devel \ libuuid-devel \ icu \ libicu \ libicu-devel \ libbsd-devel \ libedit-devel \ libxml2-devel \ libsqlite3x-devel \ swig \ python-libs \ ncurses-devel \ python-devel \ python-pkgconfig # Map some utils if [ ! -f /usr/bin/ninja ] ; then if [ -f /usr/bin/ninja-build ] ; then $SUDO ln -s /usr/bin/ninja-build /usr/bin/ninja fi fi if [ ! -f /usr/bin/gold ] ; then if [ -f /usr/bin/ld.gold ] ; then $SUDO ln -s /usr/bin/ld.gold /usr/bin/gold fi fi mkdir -p $SW_BUILD_DIR/install pushd $SW_BUILD_DIR git clone http://github.com/apple/swift.git swift/utils/update-checkout --clone swift/utils/build-script --preset=buildbot_linux install_destdir=$SW_BUILD_DIR/install installable_package=$SW_BUILD_DIR/swift.tar.gz