#!/bin/sh set -e set -x repos="$(find "$HOME" -type d -iname '*.git')" IFS=" " for repo in $repos ; do cd "$repo" git repack done