diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh index adc1e8098..6f358be1c 100644 --- a/images/linux/scripts/installers/1604/basic.sh +++ b/images/linux/scripts/installers/1604/basic.sh @@ -23,6 +23,8 @@ apt-fast install -y --no-install-recommends \ libc++abi-dev \ libcurl3 \ libicu55 \ + libpython2.7 \ + libpython2.7-dev \ libunwind8 \ locales \ netcat \ diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh new file mode 100644 index 000000000..23dd0d063 --- /dev/null +++ b/images/linux/scripts/installers/swift.sh @@ -0,0 +1,24 @@ +#!/bin/bash +################################################################################ +## File: swift.sh +## Desc: Installs Swift +################################################################################ + +# Install # Install +image_label="$(lsb_release -rs)" +wget https://swift.org/builds/swift-5.1.5-release/ubuntu${image_label//./}/swift-5.1.5-RELEASE/swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz +tar xzf swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz +sudo mv swift-5.1.5-RELEASE-ubuntu$image_label /usr/share/swift +sudo echo "PATH=/usr/share/swift/usr/bin:$PATH" | sudo tee -a /etc/environment +source ~/.bashrc + +# Run tests to determine that the software installed as expected +echo "Testing to make sure that script performed as expected, and basic scenarios work" +if ! command -v swift; then + echo "Swift was not installed" + exit 1 +fi + +# Document what was added to the image +echo "Lastly, documenting what we added to the metadata file" +DocumentInstalledItem "$(swift --version)" \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index e604b0581..78a0d8041 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -144,6 +144,7 @@ "{{template_dir}}/scripts/installers/aws.sh", "{{template_dir}}/scripts/installers/build-essential.sh", "{{template_dir}}/scripts/installers/clang.sh", + "{{template_dir}}/scripts/installers/swift.sh", "{{template_dir}}/scripts/installers/cmake.sh", "{{template_dir}}/scripts/installers/docker-compose.sh", "{{template_dir}}/scripts/installers/docker-moby.sh", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 6396229d7..70ab724ab 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -147,6 +147,7 @@ "{{template_dir}}/scripts/installers/aws.sh", "{{template_dir}}/scripts/installers/build-essential.sh", "{{template_dir}}/scripts/installers/clang.sh", + "{{template_dir}}/scripts/installers/swift.sh", "{{template_dir}}/scripts/installers/cmake.sh", "{{template_dir}}/scripts/installers/docker-compose.sh", "{{template_dir}}/scripts/installers/docker-moby.sh",