local/bin: Remove git-check and git-sync

master
Pierre Neidhardt 2018-05-24 15:36:01 +02:00
parent 6b44c355ed
commit 2e8391bd95
2 changed files with 0 additions and 44 deletions

View File

@ -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

View File

@ -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