From 47dfa3537548353768f2dc6ef95f4e44ce50d167 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 27 Mar 2020 14:12:53 +0300 Subject: [PATCH] fixed getting the swift version --- images/linux/scripts/installers/swift.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 107779131..abfbacfb5 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -9,9 +9,7 @@ source $HELPER_SCRIPTS/document.sh # Install image_label="$(lsb_release -rs)" - -curl https://swift.org/download/ > /tmp/tmp_file -swift_version=$(cat /tmp/tmp_file | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) +swift_version=$(curl https://swift.org/download/ | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz @@ -31,4 +29,4 @@ fi # Document what was added to the image echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(swift --version)" +DocumentInstalledItem "$(swift --version)" \ No newline at end of file