fix shellcheck issues (#55)
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/next Pipeline was successful Details
ci/woodpecker/push/deploy Pipeline was successful Details

#### 📖 Summary

- fix shelchek issues in arkanum bash script

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | 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: #55
This commit is contained in:
OCram85 2023-07-19 15:53:06 +02:00
parent c55408b4b3
commit 78c91dceba
1 changed files with 6 additions and 3 deletions

View File

@ -67,6 +67,7 @@ function instDockerCLI() {
sudo -E install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -E gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo -E chmod a+r /etc/apt/keyrings/docker.gpg
# shellcheck disable=SC2046,SC2027
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
@ -90,6 +91,7 @@ function instDotNet() {
say "Installing latest .NET Core LTS release..." "dotnet"
/tmp/dotnet-install.sh --channel LTS
# shellcheck disable=SC2016
echo 'export PATH=$PATH:/config/.dotnet' | sudo tee -a /etc/bash.bashrc > /dev/null
say "Cleaning up..." "dotnet"
@ -113,6 +115,7 @@ function instGoLang() {
say "Installing golang ($GOVERSION)...." "GoLang"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf /tmp/golang.tar.gz
# shellcheck disable=SC2016
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/bash.bashrc > /dev/null
say "Cleaning up..." "GoLang"
rm -f /tmp/golang.tar.gz
@ -244,7 +247,7 @@ function main() {
exit 0
fi
for i in $@; do
for i in "$@"; do
if [[ "$1" == "-h" ]]; then
showHelp
exit 0
@ -253,7 +256,7 @@ function main() {
elif [[ "$i" == "dotnet" ]]; then
instDotNet
elif [[ "$i" == "golang" ]]; then
instGoLang
instGoLang "$2"
elif [[ "$i" == "nodejs" ]]; then
if [[ "$2" == "--legacy" ]]; then
sayW "Installing NodeJS with legacy function" "Arkanum"
@ -285,4 +288,4 @@ function main() {
done
}
main $@
main "$@"