generated from Templates/Baseline
Rename install script to arkanum (#18)
#### 📖 Summary - updates project name in all refs #### 📑 Test Plan > 💡 Select your test plan for the code changes. - [x] CI pipeline tests - [ ] 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/arkanum#18
This commit is contained in:
parent
a697c7ee8f
commit
66ce973182
4
.vscode/dictionaries/project-words.txt
vendored
4
.vscode/dictionaries/project-words.txt
vendored
@ -1 +1,5 @@
|
||||
arkanum
|
||||
Fira
|
||||
LTS
|
||||
tbd
|
||||
dotnet
|
||||
|
14
Dockerfile
14
Dockerfile
@ -16,14 +16,16 @@ RUN \
|
||||
#git config --system credential.helper store && \
|
||||
echo 'source /usr/share/bash-completion/completions/git' >> /etc/bash.bashrc
|
||||
|
||||
ADD install-devruntime /usr/bin/
|
||||
ADD install-devruntime-completion /etc/bash_completion.d/
|
||||
ADD arkanum /usr/bin/
|
||||
ADD arkanum-completion /etc/bash_completion.d/
|
||||
RUN \
|
||||
chmod +x /usr/bin/install-devruntime && \
|
||||
chmod +x /etc/bash_completion.d/install-devruntime-completion && \
|
||||
echo 'source /etc/bash_completion.d/install-devruntime-completion' >> /etc/bash.bashrc && \
|
||||
chmod +x /usr/bin/arkanum && \
|
||||
chmod +x /etc/bash_completion.d/arkanum-completion && \
|
||||
echo 'source /etc/bash_completion.d/arkanum-completion' >> /etc/bash.bashrc && \
|
||||
touch "$HOME/enable_motd" && \
|
||||
echo "if [[ -e \"$HOME/enable_motd\" ]]; then echo -e \"Use \\e[32m'install-devruntime'\\e[0m to install missing runtimes like dotnet or NodeJs.\"; fi" >> /etc/bash.bashrc
|
||||
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum --reset-codesetting && \
|
||||
echo -e \"🧙 \\e[32markanum\\e[0m: Please reload Arkanum to finalize the setup...\" && read foo; fi" >> /etc/bash.bashrc && \
|
||||
echo "if [[ -e \"$HOME/enable_motd\" ]]; then echo -e \"Use 🧙 \\e[32m'arkanum'\\e[0m to install missing runtimes like dotnet or NodeJs.\"; fi" >> /etc/bash.bashrc
|
||||
|
||||
WORKDIR /app/code-server/lib/vscode/out/vs/workbench
|
||||
ADD FiraCode/fonts/* ./fonts/
|
||||
|
33
README.md
33
README.md
@ -13,7 +13,7 @@
|
||||
</p>
|
||||
|
||||
<h1 align="center">
|
||||
🧙 Arkanum 🪄
|
||||
🧙 Arkanum ✨🌌☄️💥
|
||||
</h1>
|
||||
|
||||
<p align="center">
|
||||
@ -44,27 +44,28 @@ Adds default system config with:
|
||||
|
||||
> 💡 See [gitconfig-system](./gitconfig-system) for details.
|
||||
|
||||
### 🧙 Added `install-devruntime` helper script
|
||||
### 🧙 Added `arkanum` helper script
|
||||
|
||||
Added `install-devruntime` to help installing common runtime in container.
|
||||
Added `arkanum` to help installing common runtime in container.
|
||||
This helps reducing the image size.
|
||||
|
||||
```
|
||||
install-devruntime is used to install optional runtimes for developing in a
|
||||
code-server container environment.
|
||||
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
|
||||
code-server container environment.
|
||||
|
||||
Syntax: install-devruntime RUNTIME ...
|
||||
RUNTIME [dotnet|golang|nodejs|powershell]
|
||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||
golang Installs golang 1.19.3.
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
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)
|
||||
Syntax: arkanum RUNTIME ...
|
||||
RUNTIME [dotnet|golang|nodejs|powershell]
|
||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||
golang Installs golang 1.19.3.
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
powershell Installs latest PowerShell LTS version.
|
||||
--disable-motd Disables hint in new bash terminal.
|
||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||
-h Prints this help message.
|
||||
|
||||
Example 1: install-devruntime dotnet
|
||||
Example 2: install devruntime golang nodejs
|
||||
Example 1: arkanum dotnet
|
||||
Example 2: arkanum golang nodejs
|
||||
Example 3: arkanum --disable-motd
|
||||
```
|
||||
|
||||
## 💳 Credits
|
||||
|
@ -3,45 +3,46 @@
|
||||
set -e
|
||||
|
||||
function showHelp() {
|
||||
cat <<HELP
|
||||
install-devruntime is used to install optional runtimes for developing in a
|
||||
cat << HELP
|
||||
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
|
||||
code-server container environment.
|
||||
|
||||
Syntax: install-devruntime RUNTIME ...
|
||||
Syntax: arkanum RUNTIME ...
|
||||
RUNTIME [dotnet|golang|nodejs|powershell]
|
||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||
golang Installs golang 1.19.3.
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
powershell Installs latest PowerShell LTS version.
|
||||
disablemotd Disables hint in new bash terminal.
|
||||
codesetting Sets VS Code user setting with basic (Fira Code).
|
||||
-h Prints this help messagee.
|
||||
dotnet Installs latest LTS dotnet core sdk + runtime.
|
||||
golang Installs golang 1.19.3.
|
||||
nodejs Installs latest NodeJs LTS version.
|
||||
powershell Installs latest PowerShell LTS version.
|
||||
--disable-motd Disables hint in new bash terminal.
|
||||
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
|
||||
-h Prints this help message.
|
||||
|
||||
Example 1: install-devruntime dotnet
|
||||
Example 2: install devruntime golang nodejs
|
||||
Example 1: arkanum dotnet
|
||||
Example 2: arkanum golang nodejs
|
||||
Example 3: arkanum --disable-motd
|
||||
HELP
|
||||
}
|
||||
|
||||
function disableMotd() {
|
||||
if [[ -e "$HOME/enable_motd" ]]; then
|
||||
say "Disabling 'install-devruntime' motd..." "disableMotd"
|
||||
say "Disabling 'arkanum' motd..." "disableMotd"
|
||||
rm -f "$HOME/enable_motd"
|
||||
fi
|
||||
}
|
||||
|
||||
function say() {
|
||||
if [[ -n "$2" ]]; then
|
||||
echo -e "\e[32mInstall-DevRuntime\e[0m \e[34m[$2]\e[0m: $1"
|
||||
echo -e "🧙 \e[32markanum\e[0m \e[34m[⚒️ $2]\e[0m: $1"
|
||||
else
|
||||
echo -e "\e[32mInstall-DevRuntime\e[0m: $1"
|
||||
echo -e "🧙 \e[32markanum\e[0m: $1"
|
||||
fi
|
||||
}
|
||||
|
||||
function sayE() {
|
||||
if [[ -n "$2" ]]; then
|
||||
echo -e "\e[31mInstall-DevRuntime\e[0m \e[34m[$2]\e[0m: $1" 1>&2
|
||||
echo -e "🧙 \e[31markanum\e[0m \e[34m[⚒️ $2]\e[0m: $1" 1>&2
|
||||
else
|
||||
echo -e "\e[31mInstall-DevRuntime\e[0m: $1" 1>&2
|
||||
echo -e "🧙 \e[31markanum\e[0m: $1" 1>&2
|
||||
fi
|
||||
}
|
||||
|
||||
@ -130,14 +131,16 @@ function setCodeSettings() {
|
||||
say "Setting VScode base settings.($CODEFILE)"
|
||||
cat <<EOF | tee "$CODEFILE"
|
||||
{
|
||||
"window.menuBarVisibility": "compact",
|
||||
"workbench.colorTheme": "One Dark Pro Darker",
|
||||
"window.menuBarVisibility": "classic",
|
||||
"workbench.iconTheme": "vscode-icons",
|
||||
"editor.fontFamily": "'FiraCode', 'FiraCode Nerd Font', 'FiraCode NF', Consolas, 'Courier New', monospace",
|
||||
"terminal.integrated.fontFamily": "'FiraCode Mono', 'FiraCode Nerd Font Mono', 'FiraCode NFM', Consolas, monospace",
|
||||
"editor.fontLigatures": true,
|
||||
"workbench.iconTheme": "vscode-icons",
|
||||
"editor.formatOnSave": true,
|
||||
"extensions.autoUpdate": false,
|
||||
"git.confirmSync": false
|
||||
"git.confirmSync": false,
|
||||
"telemetry.telemetryLevel": "off"
|
||||
}
|
||||
EOF
|
||||
}
|
||||
@ -160,10 +163,10 @@ function main() {
|
||||
instNodeJs
|
||||
elif [[ "$i" == "powershell" ]]; then
|
||||
instPwsh
|
||||
elif [[ "$i" == "disablemotd" ]]; then
|
||||
elif [[ "$i" == "--disable-motd" ]]; then
|
||||
disableMotd
|
||||
exit 0
|
||||
elif [[ "$i" == "codesetting" ]]; then
|
||||
elif [[ "$i" == "--reset-codesetting" ]]; then
|
||||
setCodeSettings
|
||||
exit 0
|
||||
else
|
3
arkanum-completion
Normal file
3
arkanum-completion
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
complete -W "--disable-motd --reset-codesetting dotnet golang nodejs powershell -h" arkanum
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
complete -W "codesetting disablemotd dotnet golang nodejs powershell -h" install-devruntime
|
Loading…
x
Reference in New Issue
Block a user