mirror of
https://github.com/flynx/git-utils.git
synced 2025-12-27 13:52:23 +00:00
Compare commits
No commits in common. "433faa03abf9278b16058000b092ea1606f41ccf" and "9db76806058f563e1025d89767adf794d90f41bd" have entirely different histories.
433faa03ab
...
9db7680605
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
shopt -s globstar
|
||||
|
||||
while true ; do
|
||||
@ -21,7 +20,7 @@ while true ; do
|
||||
echo "or recursively:"
|
||||
echo " $ git listall -r > reposiotry.lst"
|
||||
echo
|
||||
echo "If a repository list already exists it can be updated via:"
|
||||
echo "If a repository list already exists it can be expanded via:"
|
||||
echo " $ git listall -r reposiotry.lst >> reposiotry.lst"
|
||||
echo
|
||||
echo "For info on list file format see:"
|
||||
@ -42,12 +41,6 @@ while true ; do
|
||||
continue
|
||||
;;
|
||||
|
||||
-u|--update)
|
||||
REPOS_FILE=$2
|
||||
shift 2
|
||||
continue
|
||||
;;
|
||||
|
||||
-*|--*)
|
||||
echo "Error: unknown option: \"$1\"" >&2
|
||||
exit
|
||||
@ -80,10 +73,6 @@ else
|
||||
REPOS=(./*/.git/config)
|
||||
fi
|
||||
|
||||
if [ -e "$LIST" ] ; then
|
||||
echo
|
||||
echo "# $(date)"
|
||||
fi
|
||||
# format and print unique lines...
|
||||
lines=()
|
||||
{
|
||||
@ -93,8 +82,7 @@ lines=()
|
||||
| sed -n '/\[remote "origin"\]/,/^\s*url/p' \
|
||||
| grep 'url = ' \
|
||||
| sed \
|
||||
-e 's/\s*url\s*=\s*//' \
|
||||
-e 's/.git\s*$//')
|
||||
-e 's/\s*url\s*=\s*//')
|
||||
[ -z $remote ] \
|
||||
&& continue
|
||||
line="$path=$remote"
|
||||
@ -104,9 +92,7 @@ lines=()
|
||||
if [ -e "$LIST" ] ; then
|
||||
cat "$LIST" \
|
||||
| grep -ve '\(^\s*#\|^\s*$\)' \
|
||||
| sed \
|
||||
-e 's/^-//' \
|
||||
-e 's/.git\s*$//'
|
||||
| sed -e 's/^-//'
|
||||
fi
|
||||
} \
|
||||
| sort \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user