-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpull
More file actions
30 lines (27 loc) · 1.28 KB
/
pull
File metadata and controls
30 lines (27 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -e
while read -r git_folder; do
repo_folder=$(dirname $git_folder)
full_path=$(realpath $repo_folder)
repo_name=$(basename "$full_path")
# Un-comment the following for a visual representation of what the above shit do
# echo "┌────────────────┬────────────────────────────────┐"
# echo "│ Variable Name │ Variable Result │"
# echo "├────────────────┼────────────────────────────────┘"
# echo "│ git_folder │ $git_folder"
# echo "│ repo_folder │ $repo_folder"
# echo "│ full_path │ $full_path"
# echo "│ repo_name │ $repo_name"
# echo "└────────────────┘"
(
output=$(
{
echo "──────────────── ℹ️ Pulling $repo_name ℹ️ ────────────────"
git -C "$full_path" pull
echo "──────────────── ℹ️ Pulled $repo_name ℹ️ ─────────────────"
} 2>&1
)
echo "$output"
) &
done < <(find . -name ".git" -type d)
wait