forked from mainsail-crew/MainsailOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds kiauh module for homebrewed images (mainsail-crew#184)
* feat: adds kiauh module for homebrewed images This allows forks to add kiauh to their Image with ease. Signed-off-by: Stephan Wendel <me@stephanwe.de> --------- Signed-off-by: Stephan Wendel <me@stephanwe.de>
- Loading branch information
Showing
3 changed files
with
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
#### KIAUH Install Module | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <me@stephanwe.de> | ||
#### Copyright 2022 - till today | ||
#### https://github.com/mainsail-crew/MainsailOS | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
||
#### All Credits to th33xitus for his great tool | ||
#### https://github.com/th33xitus/kiauh | ||
|
||
# shellcheck disable=all | ||
|
||
# KIAUH repo | ||
[[ -n "$KIAUH_REPO_SHIP" ]] || KIAUH_REPO_SHIP="https://github.com/th33xitus/kiauh.git" | ||
[[ -n "$KIAUH_REPO_BRANCH" ]] || KIAUH_REPO_BRANCH="master" | ||
|
||
# Add to $PATH ? (1: yes, 0: no) | ||
[[ -n "$KIAUH_ADD_TO_PATH" ]] || KIAUH_ADD_TO_PATH="1" |
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,45 @@ | ||
#!/usr/bin/env bash | ||
#### KIAUH Install Module | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <me@stephanwe.de> | ||
#### Copyright 2022 - till today | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
||
#### All Credits to th33xitus for his great tool | ||
#### https://github.com/th33xitus/kiauh | ||
|
||
# shellcheck enable=requires-variable-braces | ||
|
||
# Error handling | ||
set -Ee | ||
|
||
# shellcheck disable=SC1091 | ||
source /common.sh | ||
install_cleanup_trap | ||
|
||
|
||
echo_green "Installing sonar ..." | ||
|
||
## Step 1: Force apt update | ||
apt-get update --allow-releaseinfo-change | ||
|
||
## Step 2: Make sure 'git' is installed! | ||
check_install_pkgs git | ||
|
||
## Step 3: Move to Home Dir as WorkingDirectoy | ||
pushd "/home/${BASE_USER}" &> /dev/null || exit 1 | ||
|
||
## Step 4: clone KIAUH repo | ||
echo_green "Clone KIAUH repository ..." | ||
gitclone KIAUH_REPO kiauh | ||
|
||
## Step 5: Link kiauh.sh in /usr/local/bin as kiauh | ||
if [[ ${KIAUH_ADD_TO_PATH} = "1" ]]; then | ||
echo_green "Add kiauh to PATH ..." | ||
sudo ln -s "/home/${BASE_USER}/kiauh/kiauh.sh" "/usr/local/bin/kiauh" | ||
fi | ||
|
||
## Finish | ||
echo_green "Installing KIAUH ... DONE!" |
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