26 lines
362 B
Bash
Executable File
26 lines
362 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
|
|
GIT_DIRS_PATH='/Forks'
|
|
if [ ! -z "$1" ]; then
|
|
GIT_DIRS_PATH="$1"
|
|
fi
|
|
|
|
FORKS=( `/bin/ls -A1 "$GIT_DIRS_PATH"` )
|
|
|
|
for FORK in "${FORKS[@]}"; do
|
|
|
|
if [ -d "$GIT_DIRS_PATH/$FORK" ]; then
|
|
cd "$GIT_DIRS_PATH/$FORK"
|
|
|
|
if [ -e "`pwd`/.git" ]; then
|
|
echo "
|
|
> '$GIT_DIRS_PATH/$FORK'"
|
|
git pull --depth 1
|
|
fi
|
|
|
|
cd "$GIT_DIRS_PATH"
|
|
|
|
fi
|
|
|
|
done
|