Skip to content

Commit 280f29d

Browse files
authored
Update 29-config-custom
1 parent 4da5dc5 commit 280f29d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

root/etc/cont-init.d/29-config-custom

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,14 @@ apt update && apt install binutils git gnupg2 libc6-dev libcurl4 libedit2 libgcc
55

66
echo "Installing Swift binaries"
77
curl https://download.swift.org/swift-5.8-release/ubuntu2204/swift-5.8-RELEASE/swift-5.8-RELEASE-ubuntu22.04.tar.gz --output swift.tar.gz
8-
tar zxvf swift.tar.gz
8+
tar --strip-components=1 -zxf swift.tar.gz --directory /
99
rm swift.tar.gz
10-
mv swift-5.8-RELEASE-ubuntu22.04/ swift
11-
12-
echo "Adding Swift to PATH"
13-
echo 'export PATH=/swift/usr/bin:"${PATH}"' >> /root/.bashrc
14-
source /root/.bashrc
1510

1611
echo "Checking Swift version"
17-
/swift/usr/bin/swift -version
12+
/usr/bin/swift -version
1813

1914
echo "Adding Swift to PATH for VSCode"
20-
echo 'export PATH=/swift/usr/bin:"${PATH}"' >> /config/.bashrc && source /config/.bashrc
15+
echo 'export PATH=/usr/bin:"${PATH}"' >> /config/.bashrc && source /config/.bashrc
2116

2217
echo "Swift binaries installed for VSCode. Trying to install the sswg.swift-lang extension"
2318

0 commit comments

Comments
 (0)