dev-env/bin/script/foreachSystem
2024-08-04 21:31:58 +02:00

21 lines
339 B
Bash
Executable File

#!/bin/bash
EXEC_DIR=$(pwd)
FILE_TO_EXECUTE=$1
if [ ! -z $1 ]
then
echo "Execute " $1 " in each system"
else
echo "Execute foreachSystem failed, because no parameter was provided"
exit
fi
for SYSTEM in systems/*/*/ ; do
echo "executing ${FILE_TO_EXECUTE} in ${SYSTEM}"
cd $SYSTEM
./bin/script/$FILE_TO_EXECUTE
cd $EXEC_DIR
done