Move installs, add vs code install
This commit is contained in:
parent
aa7d52cef3
commit
013e82d56d
15 changed files with 58 additions and 6 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "zsh/zsh-files/.oh-my-zsh"]
|
[submodule "zsh/zsh-files/.oh-my-zsh"]
|
||||||
path = zsh/zsh-files/.oh-my-zsh
|
path = install-stuff/zsh/zsh-files/.oh-my-zsh
|
||||||
url = https://github.com/askiiart/.oh-my-zsh
|
url = https://github.com/askiiart/.oh-my-zsh
|
||||||
|
|
|
@ -38,10 +38,17 @@ fi
|
||||||
if [ -d "${HOME}/git-credential-manager" ]; then
|
if [ -d "${HOME}/git-credential-manager" ]; then
|
||||||
echo "Git Credential Manager already installed, skipping..."
|
echo "Git Credential Manager already installed, skipping..."
|
||||||
else
|
else
|
||||||
# Install git credential manager
|
if command_exists "apt-get"; then
|
||||||
curl -L https://aka.ms/gcm/linux-install-source.sh | sh
|
curl $(curl -s https://api.github.com/repos/git-ecosystem/git-credential-manager/releases/latest | grep "browser_download_url.*gcm-linux_amd64.*.deb" | cut -d : -f 2,3 | tr -d \") -LO
|
||||||
git-credential-manager configure
|
chmod 777 ./gcm-linux_amd64.*.deb
|
||||||
rm dotnet-install.sh
|
sudo apt-get install ./gcm-linux_amd64.*.deb -y
|
||||||
|
rm -f ./gcm-linux_amd64.*.deb
|
||||||
|
else
|
||||||
|
# Install git credential manager
|
||||||
|
curl -L https://aka.ms/gcm/linux-install-source.sh | sh
|
||||||
|
git-credential-manager configure
|
||||||
|
rm dotnet-install.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|
6
do-everything.bash
Normal file
6
do-everything.bash
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
chmod 700 ./daily-use-pcs/setup-git.bash
|
||||||
|
./daily-use-pcs/setup-git.bash
|
||||||
|
|
||||||
|
chmod 700 ./install-stuff/*.bash
|
||||||
|
./install-stuff/*.bash
|
40
install-stuff/install-vs-code.bash
Normal file
40
install-stuff/install-vs-code.bash
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
if [ $(whoami) == "root" ]; then
|
||||||
|
echo "Run as a normal user, not root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
command_exists() { type "$1" &>/dev/null; }
|
||||||
|
|
||||||
|
if command_exists "apt-get"; then
|
||||||
|
sudo apt-get install wget gpg
|
||||||
|
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
|
||||||
|
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
|
||||||
|
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
|
||||||
|
rm -f packages.microsoft.gpg
|
||||||
|
sudo apt install apt-transport-https
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install code
|
||||||
|
elif command_exists "yum"; 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'
|
||||||
|
yum check-update
|
||||||
|
sudo yum install code -y
|
||||||
|
elif command_exists "pacman"; then
|
||||||
|
yay -S visual-studio-code-bin --noconfirm --needed
|
||||||
|
elif command_exists "zypp"; then
|
||||||
|
# Untested
|
||||||
|
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\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/vscode.repo'
|
||||||
|
sudo zypper refresh
|
||||||
|
sudo zypper install code
|
||||||
|
elif command_exists "emerge"; then
|
||||||
|
echo Not yet supported, exiting...
|
||||||
|
exit
|
||||||
|
elif command_exists "apk"; then
|
||||||
|
echo Not yet supported, exiting...
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "Unsupported: unknown package manager and distro"
|
||||||
|
fi
|
|
@ -27,4 +27,3 @@ elif command_exists "apk"; then
|
||||||
else
|
else
|
||||||
echo "Unsupported: unknown package manager and distro"
|
echo "Unsupported: unknown package manager and distro"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue