Move installs, add vs code install

This commit is contained in:
askiiart 2023-09-10 12:35:10 -05:00
parent aa7d52cef3
commit 013e82d56d
No known key found for this signature in database
GPG key ID: C89CBC4F981EE719
15 changed files with 58 additions and 6 deletions

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[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

View file

@ -37,12 +37,19 @@ fi
# Check if GCM is installed
if [ -d "${HOME}/git-credential-manager" ]; then
echo "Git Credential Manager already installed, skipping..."
else
if command_exists "apt-get"; then
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
chmod 777 ./gcm-linux_amd64.*.deb
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
############################################
# Do GPG key stuff for commit verification #

6
do-everything.bash Normal file
View 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

View 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

View file

@ -27,4 +27,3 @@ elif command_exists "apk"; then
else
echo "Unsupported: unknown package manager and distro"
fi