#!/bin/bash src="../zzLib/Libs" start=".." findterm="Libs/zzAddOn" msg=$1 if [ -z $1 ] then msg="Update Libs" fi for entry in "$start"/* do if [ -e "$entry/$findterm" ] then echo "$entry" cp -ra $src $entry cd $entry git commit "Libs/*" -m "$msg" && git push cd - fi done