From 66ce97318284acd2c6327582e74e66e9c3b04e43 Mon Sep 17 00:00:00 2001
From: OCram85
Date: Thu, 17 Nov 2022 09:55:16 +0100
Subject: [PATCH] Rename install script to arkanum (#18)
#### :book: Summary
- updates project name in all refs
#### :bookmark_tabs: Test Plan
> :bulb: Select your test plan for the code changes.
- [x] CI pipeline tests
- [ ] Custom test
- [ ] No test plan
##### Details / Justification
#### :books: Additional Notes
Co-authored-by: OCram85
Reviewed-on: https://gitea.ocram85.com/CodeServer/arkanum/pulls/18
---
.vscode/dictionaries/project-words.txt | 4 +++
Dockerfile | 14 ++++----
README.md | 33 +++++++++---------
install-devruntime => arkanum | 47 ++++++++++++++------------
arkanum-completion | 3 ++
install-devruntime-completion | 3 --
6 files changed, 57 insertions(+), 47 deletions(-)
rename install-devruntime => arkanum (77%)
create mode 100644 arkanum-completion
delete mode 100644 install-devruntime-completion
diff --git a/.vscode/dictionaries/project-words.txt b/.vscode/dictionaries/project-words.txt
index 0601a09..eaf90c9 100644
--- a/.vscode/dictionaries/project-words.txt
+++ b/.vscode/dictionaries/project-words.txt
@@ -1 +1,5 @@
+arkanum
+Fira
+LTS
tbd
+dotnet
diff --git a/Dockerfile b/Dockerfile
index c6728bf..dfaf738 100644
--- a/Dockerfile
+++ b/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/
diff --git a/README.md b/README.md
index b8e4999..c6e4a88 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
- 🧙 Arkanum 🪄
+ 🧙 Arkanum ✨🌌☄️💥
@@ -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
diff --git a/install-devruntime b/arkanum
similarity index 77%
rename from install-devruntime
rename to arkanum
index 507b29b..6530d10 100755
--- a/install-devruntime
+++ b/arkanum
@@ -3,45 +3,46 @@
set -e
function showHelp() {
- cat <&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 <