check if vscode is already installed.

pull/42/head
Muhammad Atif Ali 2 years ago
parent 3f16927d4b
commit a6d59106ba
No known key found for this signature in database

@ -1,7 +1,11 @@
#!/usr/bin/env sh
BOLD='\033[0;1m'
# check if
# check if VS Code is installed
if
! command -v code &
>/dev/null
then
printf "$${BOLD}Installing VS Code!\n"
output=$(curl -L "https://update.code.visualstudio.com/${VERSION}/linux-deb-x64/stable" -o /tmp/code.deb && sudo apt-get install -y /tmp/code.deb)
if [ $? -ne 0 ]; then
@ -9,6 +13,9 @@ if [ $? -ne 0 ]; then
exit 1
fi
printf "🥳 VS code has been installed.\n\n"
else
printf "🥳 VS code is already installed.\n\n"
fi
echo "👷 Running code serve-web in the background..."
echo "Check logs at ${LOG_PATH}!"

Loading…
Cancel
Save