adds setCode helper (#6)
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/next Pipeline was successful Details
ci/woodpecker/push/master Pipeline was successful Details

#### 📖 Summary

- adds `setcode` parameter in `install-devrutime` sctiüz

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

- [x] Tested via Drone.io pipeline
- [ ] Custom test
- [ ] No test plan

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/Container#6
This commit is contained in:
OCram85 2022-11-08 19:23:13 +01:00
parent e73eabc2c5
commit 494f236ca7
2 changed files with 23 additions and 1 deletions

View File

@ -15,6 +15,8 @@ function showHelp() {
powershell Installs latest PowerShell LTS version.
-h Prints this help messagee.
disablemotd Disables hint in new bash terminal
setcode Sets VS Code user setting with basic (Fira Code)
Example 1: install-devruntime dotnet
Example 2: install devruntime golang nodejs
HELP
@ -123,6 +125,23 @@ function instPwsh() {
echo "done." "PowerShell"
}
function setCodeSettings() {
CODEFILE="$HOME/data/User/settings.json"
say "Setting VScode base settings.($CODEFILE)"
cat <<EOF | tee "$CODEFILE"
{
"workbench.colorTheme": "One Dark Pro Darker",
"window.menuBarVisibility": "classic",
"editor.fontFamily": "'FiraCode Nerd Font', 'FiraCode NF', Consolas, 'Courier New', monospace",
"terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono', 'FiraCode NFM', Consolas, monospace",
"editor.fontLigatures": true,
"workbench.iconTheme": "vscode-icons",
"extensions.autoUpdate": false,
"git.confirmSync": false
}
EOF
}
function main() {
if [[ "$#" == "0" ]]; then
showHelp
@ -144,6 +163,9 @@ function main() {
elif [[ "$i" == "disablemotd" ]]; then
disableMotd
exit 0
elif [[ "$i" == "setcode" ]]; then
setCodeSettings
exit 0
else
sayE "Unknown parameter value given!($i)."
showHelp

View File

@ -1,3 +1,3 @@
#!/bin/bash
complete -W "disablemotd dotnet golang nodejs powershell -h" install-devruntime
complete -W "disablemotd dotnet golang nodejs powershell setcode -h" install-devruntime