git pull 2>&1 | grep -v "X11 forwarding request failed" | squash_first_few_crs
retval=${PIPESTATUS[0]}
else
+ # this is not an error necessarily; we'll just pretend they planned this.
echo no repository in $directory
- retval=1
fi
popd &>/dev/null
return $retval
local tempfile="$1"; shift
local action="$1"; shift
- dirs=($(cat $tempfile))
+# dirs=($(cat $tempfile))
- for dirname in ${dirs[@]}; do
+ while read -u 3 dirname; do
+# for dirname in "${dirs[@]}"; do
if [ -z "$dirname" ]; then continue; fi
- pushd $dirname &>/dev/null
+ pushd "$dirname" &>/dev/null
echo "[$(pwd)]"
$action .
echo "======="
popd &>/dev/null
- done
+ done 3<"$tempfile"
rm $tempfile
}