From d2fbc00f68ff55188bc5ab075ba277c258cee882 Mon Sep 17 00:00:00 2001 From: DT3264 Date: Fri, 11 Aug 2023 17:56:02 -0600 Subject: [PATCH] [vscode-extensions] Refactoring extensions # How to test - pull this PR - open vscodium and in the extensions tab type @builtin, keep track of the extension count on each section - close vscodium - execute ./make-extensions.sh (after that all of the 5 modules should be under /run/initramfs...) - enable all of the 5 extensions - open vscodium and look again for the builtin extensions and now you should have 5 more :D --- .../vscode-extensions/make-extensions.sh | 6 +++ .../vscode-extensions/vsc-clangd.sh | 39 +++++++++++++++++++ .../vscode-extensions/vsc-cpp-compile-run.sh | 39 +++++++++++++++++++ .../vscode-extensions/vsc-cpptools.sh | 39 +++++++++++++++++++ .../vsc-intellij-idea-keybindings.sh | 39 +++++++++++++++++++ .../vscode-extensions/vsc-vscodevim.sh | 39 +++++++++++++++++++ 6 files changed, 201 insertions(+) create mode 100755 software-modules/programming/vscode-extensions/make-extensions.sh create mode 100755 software-modules/programming/vscode-extensions/vsc-clangd.sh create mode 100755 software-modules/programming/vscode-extensions/vsc-cpp-compile-run.sh create mode 100755 software-modules/programming/vscode-extensions/vsc-cpptools.sh create mode 100755 software-modules/programming/vscode-extensions/vsc-intellij-idea-keybindings.sh create mode 100755 software-modules/programming/vscode-extensions/vsc-vscodevim.sh diff --git a/software-modules/programming/vscode-extensions/make-extensions.sh b/software-modules/programming/vscode-extensions/make-extensions.sh new file mode 100755 index 00000000..cec4a8b9 --- /dev/null +++ b/software-modules/programming/vscode-extensions/make-extensions.sh @@ -0,0 +1,6 @@ +#!/bin/bash +./vsc-clangd.sh +./vsc-cpp-compile-run.sh +./vsc-cpptools.sh +./vsc-vscodevim.sh +./vsc-intellij-idea-keybindings.sh diff --git a/software-modules/programming/vscode-extensions/vsc-clangd.sh b/software-modules/programming/vscode-extensions/vsc-clangd.sh new file mode 100755 index 00000000..6709de93 --- /dev/null +++ b/software-modules/programming/vscode-extensions/vsc-clangd.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# vsc-cpp-compile-run.sh +# Script to build the modular software package of Visual Studio Code +# clangd extension. +# +# Copyright (C) 2023, huronOS Project: +# +# +# Licensed under the GNU GPL Version 2 +# +# +# Authors: +# Daniel Cerna + +set -xe + +EXTENSION_NAME="vsc-clangd" +EXTENSION_FILE="$EXTENSION_NAME.vsix" +EXTENSION_URL="https://github.com/clangd/vscode-clangd/releases/download/0.1.24/vscode-clangd-0.1.24.vsix" +EXTENSION_FOLDER="$EXTENSION_NAME/extension" +HSM_FILE="$EXTENSION_NAME.hsm" +# Downloads extension +curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL" +# Extracts current extension +mkdir "$EXTENSION_NAME" +unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME" +# Prepares lab folder +LAB_FOLDER="$EXTENSION_NAME-hsm-lab/" +DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/" +mkdir -p "$DESTINATION_FOLDER" +# Moves extension to the destination folder +mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME" +# Creates the huronOS module +mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet +# Removes any temporary file +rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME" +# Moves the module to the final destination +mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/ diff --git a/software-modules/programming/vscode-extensions/vsc-cpp-compile-run.sh b/software-modules/programming/vscode-extensions/vsc-cpp-compile-run.sh new file mode 100755 index 00000000..50a1d580 --- /dev/null +++ b/software-modules/programming/vscode-extensions/vsc-cpp-compile-run.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# vsc-cpp-compile-run.sh +# Script to build the modular software package of Visual Studio Code +# cpp-compile-run extension. +# +# Copyright (C) 2023, huronOS Project: +# +# +# Licensed under the GNU GPL Version 2 +# +# +# Authors: +# Daniel Cerna + +set -xe + +EXTENSION_NAME="vsc-cpp-compile-run" +EXTENSION_FILE="$EXTENSION_NAME.vsix" +EXTENSION_URL="https://github.com/danielpinto8zz6/c-cpp-compile-run/releases/download/v1.0.45/c-cpp-compile-run-1.0.45.vsix" +EXTENSION_FOLDER="$EXTENSION_NAME/extension" +HSM_FILE="$EXTENSION_NAME.hsm" +# Downloads extension +curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL" +# Extracts current extension +mkdir "$EXTENSION_NAME" +unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME" +# Prepares lab folder +LAB_FOLDER="$EXTENSION_NAME-hsm-lab/" +DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/" +mkdir -p "$DESTINATION_FOLDER" +# Moves extension to the destination folder +mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME" +# Creates the huronOS module +mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet +# Removes any temporary file +rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME" +# Moves the module to the final destination +mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/ diff --git a/software-modules/programming/vscode-extensions/vsc-cpptools.sh b/software-modules/programming/vscode-extensions/vsc-cpptools.sh new file mode 100755 index 00000000..e84dc658 --- /dev/null +++ b/software-modules/programming/vscode-extensions/vsc-cpptools.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# vsc-cpp-compile-run.sh +# Script to build the modular software package of Visual Studio Code +# cpptools extension. +# +# Copyright (C) 2023, huronOS Project: +# +# +# Licensed under the GNU GPL Version 2 +# +# +# Authors: +# Daniel Cerna + +set -xe + +EXTENSION_NAME="vsc-cpptools" +EXTENSION_FILE="$EXTENSION_NAME.vsix" +EXTENSION_URL="https://github.com/microsoft/vscode-cpptools/releases/download/v1.16.3/cpptools-linux.vsix" +EXTENSION_FOLDER="$EXTENSION_NAME/extension" +HSM_FILE="$EXTENSION_NAME.hsm" +# Downloads extension +curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL" +# Extracts current extension +mkdir "$EXTENSION_NAME" +unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME" +# Prepares lab folder +LAB_FOLDER="$EXTENSION_NAME-hsm-lab/" +DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/" +mkdir -p "$DESTINATION_FOLDER" +# Moves extension to the destination folder +mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME" +# Creates the huronOS module +mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet +# Removes any temporary file +rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME" +# Moves the module to the final destination +mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/ diff --git a/software-modules/programming/vscode-extensions/vsc-intellij-idea-keybindings.sh b/software-modules/programming/vscode-extensions/vsc-intellij-idea-keybindings.sh new file mode 100755 index 00000000..3075791c --- /dev/null +++ b/software-modules/programming/vscode-extensions/vsc-intellij-idea-keybindings.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# vsc-cpp-compile-run.sh +# Script to build the modular software package of Visual Studio Code +# IntelliJ Idea Keybindings extension. +# +# Copyright (C) 2023, huronOS Project: +# +# +# Licensed under the GNU GPL Version 2 +# +# +# Authors: +# Daniel Cerna + +set -xe + +EXTENSION_NAME="vsc-intellij-idea-keybindings" +EXTENSION_FILE="$EXTENSION_NAME.vsix" +EXTENSION_URL="https://github.com/kasecato/vscode-intellij-idea-keybindings/releases/download/v1.5.9/intellij-idea-keybindings-1.5.9.vsix" +EXTENSION_FOLDER="$EXTENSION_NAME/extension" +HSM_FILE="$EXTENSION_NAME.hsm" +# Downloads extension +curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL" +# Extracts current extension +mkdir "$EXTENSION_NAME" +unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME" +# Prepares lab folder +LAB_FOLDER="$EXTENSION_NAME-hsm-lab/" +DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/" +mkdir -p "$DESTINATION_FOLDER" +# Moves extension to the destination folder +mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME" +# Creates the huronOS module +mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet +# Removes any temporary file +rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME" +# Moves the module to the final destination +mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/ diff --git a/software-modules/programming/vscode-extensions/vsc-vscodevim.sh b/software-modules/programming/vscode-extensions/vsc-vscodevim.sh new file mode 100755 index 00000000..baaa54a0 --- /dev/null +++ b/software-modules/programming/vscode-extensions/vsc-vscodevim.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# vsc-cpp-compile-run.sh +# Script to build the modular software package of Visual Studio Code +# vscodeVim extension. +# +# Copyright (C) 2023, huronOS Project: +# +# +# Licensed under the GNU GPL Version 2 +# +# +# Authors: +# Daniel Cerna + +set -xe + +EXTENSION_NAME="vsc-vscodevim" +EXTENSION_FILE="$EXTENSION_NAME.vsix" +EXTENSION_URL="https://github.com/VSCodeVim/Vim/releases/download/v1.25.2/vim-1.25.2.vsix" +EXTENSION_FOLDER="$EXTENSION_NAME/extension" +HSM_FILE="$EXTENSION_NAME.hsm" +# Downloads extension +curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL" +# Extracts current extension +mkdir "$EXTENSION_NAME" +unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME" +# Prepares lab folder +LAB_FOLDER="$EXTENSION_NAME-hsm-lab/" +DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/" +mkdir -p "$DESTINATION_FOLDER" +# Moves extension to the destination folder +mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME" +# Creates the huronOS module +mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet +# Removes any temporary file +rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME" +# Moves the module to the final destination +mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/