Update 98-golang

This commit is contained in:
n-i-x 2020-05-19 23:31:49 -04:00 committed by GitHub
parent 260a0f01f6
commit e4aebe3b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
#!/usr/bin/with-contenv bash
echo "ensuring golang is in PATH"
if grep -q '^PATH=' /etc/services.d/code-server/run; then
if ! grep -q '^PATH=.*/usr/local/go/bin.*' /etc/services.d/code-server/run; then
if grep -q -E '^(export )?PATH=' /etc/services.d/code-server/run; then
if ! grep -q -E '^(export )?PATH=.*/usr/local/go/bin.*' /etc/services.d/code-server/run; then
sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/services.d/code-server/run
fi
else