Prettier pull.sh
This commit is contained in:
parent
1ac15f047d
commit
1f6fcc4a8c
30
pull.sh
30
pull.sh
@ -1,13 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
__r__(){
|
||||
end="$1"
|
||||
for _ in $(seq 1 "$end"); do
|
||||
printf '%s' "$2";
|
||||
done
|
||||
}
|
||||
|
||||
cd ..
|
||||
|
||||
for d in *; do
|
||||
echo "current directory: $d"
|
||||
cd "$d"
|
||||
# git pull
|
||||
cd "$d" || continue
|
||||
|
||||
#PULL_LOG=$(script -q /dev/null -c 'git pull')
|
||||
#if [ "$PULL_LOG" != "$(env printf 'Already up to date.\r\n')" ]; then
|
||||
# env printf "┌$(__r__ 40 ─)┐\n"
|
||||
# env printf "│ %-38s │\n" "$d"
|
||||
# env printf "└$(__r__ 40 '─')┘\n"
|
||||
# echo "$PULL_LOG"
|
||||
#fi
|
||||
|
||||
# git gc
|
||||
# git clean -fx
|
||||
git status -s
|
||||
|
||||
STATUS_LOG=$(script -q /dev/null -c 'git status -s')
|
||||
if [ -n "$STATUS_LOG" ]; then
|
||||
env printf "┌$(__r__ 40 ─)┐\n"
|
||||
env printf "│ %-38s │\n" "$d"
|
||||
env printf "└$(__r__ 40 '─')┘\n"
|
||||
echo "$STATUS_LOG"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user