19 lines
376 B
Bash
Executable file
19 lines
376 B
Bash
Executable file
#!/bin/env sh
|
|
|
|
set -eu
|
|
|
|
SCRIPTPATH="$(
|
|
cd -- "$(dirname "$0")" >/dev/null 2>&1
|
|
pwd -P
|
|
)"
|
|
EXECUTORS_PATH="$SCRIPTPATH/executors"
|
|
|
|
export TARGET_MODE=$1
|
|
|
|
echo "=> Setup ${TARGET_MODE}..."
|
|
|
|
while IFS= read -r file; do
|
|
if [[ -x "$file" && ! "$file" =~ "##" && ! "$file" =~ ~$ && ! "$file" =~ ".bak" ]]; then
|
|
$file
|
|
fi
|
|
done < <(find -L "$EXECUTORS_PATH" -type f | sort)
|