/ worker_envs / install.sh
install.sh
1 #!/bin/bash 2 # This script executes all executable .sh scripts in the envs directory and its subdirectories 3 4 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 5 ENVS_DIR="$SCRIPT_DIR/envs" 6 7 if [ ! -d "$ENVS_DIR" ]; then 8 echo "envs directory not found at $ENVS_DIR" 9 exit 1 10 fi 11 12 echo "Installing all environments in $ENVS_DIR" 13 14 find "$ENVS_DIR" -type f -name "*.sh" | while read -r script; do 15 echo "Installing $script" 16 bash "$script" 17 done