-
Notifications
You must be signed in to change notification settings - Fork 20
Add installer for Visual Studio Code #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JosephSemrai
wants to merge
3
commits into
leopardslab:master
Choose a base branch
from
JosephSemrai:vs-code-installer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
|
||
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS | ||
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS | ||
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions | ||
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux | ||
APK_CMD=$(which apk) # apk package manager for Alpine | ||
|
||
if [ ! -z $APT_GET_CMD ]; then | ||
sudo apt update | ||
sudo apt install software-properties-common apt-transport-https wget | ||
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - | ||
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | ||
sudo apt update | ||
sudo apt install code | ||
elif [ ! -z $DNF_CMD ]; then | ||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | ||
sudo dnf check-update | ||
sudo dnf install code | ||
elif [ ! -z $YUM_CMD ]; then | ||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | ||
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
sudo yum check-update | ||
sudo yum install code | ||
elif [ ! -z $PACMAN_CMD ]; then | ||
sudo pacman -Sy | ||
sudo pacman -S git | ||
cd ~/Downloads | ||
git clone https://AUR.archlinux.org/visual-studio-code-bin.git | ||
cd visual-studio-code-bin/ | ||
makepkg -s | ||
sudo pacman -U visual-studio-code-bin-*.pkg.tar.xz | ||
cd ../ && sudo rm -rfv visual-studio-code-bin/ | ||
elif [ ! -z $APK_CMD ]; then | ||
echo "Visual Studio Code does not officially support Alpine Linux. In order to install, you must patch Alpine with glibc and install all apk pre-requisites." | ||
else | ||
echo "Couldn't install package" | ||
exit 1; | ||
fi | ||
|
||
code | ||
JosephSemrai marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.