Update Bash Scripts/Install_Programs.sh
This commit is contained in:
1 parent
a797f1933c
commit
8a42203bd8
1 file changed
+26
@@ -21,6 +21,9 @@ WORKDIR=$(mktemp -d)
|
||||
chmod 755 "$WORKDIR"
|
||||
trap 'rm -rf "$WORKDIR"' EXIT
|
||||
|
||||
# Raw file base for your Gitea configs repo
|
||||
CONFIGS_URL="https://scripts.gabesville.com/Gabesville/Debian-Linux/raw/branch/main/Program%20Configs"
|
||||
|
||||
# ---------- helpers ----------
|
||||
|
||||
# Prompts; returns 0 if the user said yes, 1 otherwise.
|
||||
@@ -234,6 +237,29 @@ install_vscode () {
|
||||
echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
|
||||
sudo apt update
|
||||
sudo apt install -y code
|
||||
|
||||
# Import settings and extensions from the configs repo
|
||||
VSCODE_USER_DIR="$HOME/.config/Code/User"
|
||||
mkdir -p "$VSCODE_USER_DIR"
|
||||
|
||||
if curl -fsSL "$CONFIGS_URL/vscode/settings.json" -o "$WORKDIR/vscode-settings.json"; then
|
||||
if [ -f "$VSCODE_USER_DIR/settings.json" ]; then
|
||||
cp "$VSCODE_USER_DIR/settings.json" "$VSCODE_USER_DIR/settings.json.bak"
|
||||
fi
|
||||
cp "$WORKDIR/vscode-settings.json" "$VSCODE_USER_DIR/settings.json"
|
||||
echo "Imported VS Code settings"
|
||||
else
|
||||
echo "❌ Could not download VS Code settings, skipping"
|
||||
fi
|
||||
|
||||
if curl -fsSL "$CONFIGS_URL/vscode/extensions.txt" -o "$WORKDIR/vscode-extensions.txt"; then
|
||||
while read -r ext; do
|
||||
[ -n "$ext" ] || continue
|
||||
code --install-extension "$ext" < /dev/null || echo "❌ Failed to install extension $ext"
|
||||
done < "$WORKDIR/vscode-extensions.txt"
|
||||
else
|
||||
echo "❌ Could not download VS Code extension list, skipping"
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user