darkrc/bin/farfetched

6 lines
165 B
Bash
Executable File

#!/bin/sh
if [ -d "$1" ]; then cd $1; fi
find . -type d -name '.git' \
| sed 's/\/\.git$//' \
| xargs -P $(nproc) -I % sh -c "echo 'Fetching %...'; cd %; git fetch"