local/bin: Remove git-check and git-sync
parent
6b44c355ed
commit
2e8391bd95
|
@ -1,21 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
cat <<EOF>&2
|
||||
Usage: ${0##*/} FOLDERS
|
||||
|
||||
Chack all FOLDERS for a git repo with non-commited files.
|
||||
EOF
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage && exit 1
|
||||
[ "$1" = "-h" ] && usage && exit
|
||||
[ "$1" = "--" ] && shift
|
||||
|
||||
for i; do
|
||||
cd "$i" || continue
|
||||
if [ -d ".git" ]; then
|
||||
LC_ALL=C git status -uno | grep -q "nothing to commit" || echo "$i"
|
||||
fi
|
||||
cd - >/dev/null
|
||||
done
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
cat <<EOF>&2
|
||||
Usage: ${0##*/} FOLDERS
|
||||
|
||||
Sync all git repos found in FOLDERS.
|
||||
EOF
|
||||
}
|
||||
|
||||
[ $# -eq 0 ] && usage && exit 1
|
||||
[ "$1" = "-h" ] && usage && exit
|
||||
[ "$1" = "--" ] && shift
|
||||
|
||||
for i; do
|
||||
status="$(cd -- "$i" && git status -uno)"
|
||||
if echo "$status" | grep -q "Your branch is ahead of"; then
|
||||
echo "$i"
|
||||
echo "$status"
|
||||
(cd -- "$i" && git push)
|
||||
echo
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue