Adds secret loading

This commit is contained in:
Michel Fedde 2025-09-27 15:15:30 +02:00
parent cbf899eb40
commit 63fcd502a8
5 changed files with 81 additions and 30 deletions

View file

@ -26,6 +26,8 @@ declare -x -a actions
actions=()
declare -x -a gitInstalls
applications+=("")
addApplications ()
{
for application in "$@"; do
@ -48,12 +50,15 @@ addGitInstall() {
gitInstalls+=("$name;$path;$setupCommand")
}
while IFS= read -r file; do
if [[ -x "$file" && ! "$file" =~ "##" && ! "$file" =~ ~$ && ! "$file" =~ ".bak" ]]; then
source $file
fi
done < <(find -L "$APPLICATIONS_PATH" -type f | sort)
if [[ ! -z "$1" ]]; then
source "$APPLICATIONS_PATH/$1.sh"
else
while IFS= read -r file; do
if [[ -x "$file" && ! "$file" =~ "##" && ! "$file" =~ ~$ && ! "$file" =~ ".bak" ]]; then
source $file
fi
done < <(find -L "$APPLICATIONS_PATH" -type f | sort)
fi
echo -n "# Installing/Updating applications (${#applications[@]})"
@ -109,5 +114,5 @@ echo "# Executing actions... (${#actions[@]})"
for action in "${actions[@]}";
do
echo "==> Now executing: ${action}"
$action > /dev/null
$action
done