-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Modules] Adding cpptools vscode extension
- Loading branch information
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
39 changes: 39 additions & 0 deletions
39
software-modules/programming/vscode-extensions/vsc-cpptools.sh
This file contains 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,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: | ||
# <http://huronos.org> | ||
# | ||
# Licensed under the GNU GPL Version 2 | ||
# <http://www.gnu.org/licenses/gpl-2.0.html> | ||
# | ||
# Authors: | ||
# Daniel Cerna <dcerna@huronos.org> | ||
|
||
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/ |