Seperated git pull and git status scripts

This commit is contained in:
saundersp
2025-03-25 16:11:27 +01:00
parent 98e335ac07
commit 9ecf4d2fde
2 changed files with 27 additions and 14 deletions

24
status.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
__r__(){
end="$1"
for _ in $(seq 1 "$end"); do
printf '%s' "$2";
done
}
cd ..
for d in *; do
cd "$d" || continue
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