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,14 +1,21 @@
#!/usr/bin/env sh #!/usr/bin/env sh
BOLD='\033[0;1m' BOLD='\033[0;1m'
# check if # check if VS Code is installed
printf "$${BOLD}Installing VS Code!\n" if
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) ! command -v code &
if [ $? -ne 0 ]; then >/dev/null
echo "Failed to install VS Code: $output" then
exit 1 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
echo "Failed to install VS Code: $output"
exit 1
fi
printf "🥳 VS code has been installed.\n\n"
else
printf "🥳 VS code is already installed.\n\n"
fi fi
printf "🥳 VS code has been installed.\n\n"
echo "👷 Running code serve-web in the background..." echo "👷 Running code serve-web in the background..."
echo "Check logs at ${LOG_PATH}!" echo "Check logs at ${LOG_PATH}!"

Loading…
Cancel
Save