Files
wordpress-stack/scripts/composer-loop.sh
2026-04-23 09:53:10 -03:00

19 lines
346 B
Bash
Executable File

#! /bin/sh
base_path="${1}";
command="${2}";
for item in $base_path/*; do
if test ! -d $item; then
#echo "\"${item}\" is not a directory";
continue;
fi
if test ! -f "${item}/composer.json"; then
#echo "\"${item}\" is not a composer package";
continue;
fi
cd ${item};
composer ${command};
cd -;
done