mirror of
https://github.com/flynx/git-utils.git
synced 2025-10-28 10:40:08 +00:00
Compare commits
2 Commits
de8c0781b9
...
c0c8dd5eca
| Author | SHA1 | Date | |
|---|---|---|---|
| c0c8dd5eca | |||
| 30b950db24 |
@ -12,6 +12,7 @@ while true ; do
|
|||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h --help - print this message and exit"
|
echo " -h --help - print this message and exit"
|
||||||
echo " -r --recursive - list directories recursively"
|
echo " -r --recursive - list directories recursively"
|
||||||
|
echo " -d --dirs-only - list directories only"
|
||||||
echo
|
echo
|
||||||
echo "Repository list can be constructed from an existing set of repositories via:"
|
echo "Repository list can be constructed from an existing set of repositories via:"
|
||||||
echo " $ git listall > reposiotry.lst"
|
echo " $ git listall > reposiotry.lst"
|
||||||
@ -34,6 +35,12 @@ while true ; do
|
|||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-d|--dirs-only)
|
||||||
|
DIRS_ONLY=1
|
||||||
|
shift
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
|
||||||
-*|--*)
|
-*|--*)
|
||||||
echo "Error: unknown option: \"$1\"" >&2
|
echo "Error: unknown option: \"$1\"" >&2
|
||||||
exit
|
exit
|
||||||
@ -46,6 +53,17 @@ while true ; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# prepare putput...
|
||||||
|
prep(){
|
||||||
|
if ! [ -z $DIRS_ONLY ] ; then
|
||||||
|
sed -e 's/=.*//'
|
||||||
|
else
|
||||||
|
cat
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TARGET_PATH=${TARGET_PATH:=.}
|
TARGET_PATH=${TARGET_PATH:=.}
|
||||||
cd "$TARGET_PATH"
|
cd "$TARGET_PATH"
|
||||||
|
|
||||||
@ -78,7 +96,8 @@ lines=()
|
|||||||
fi
|
fi
|
||||||
} \
|
} \
|
||||||
| sort \
|
| sort \
|
||||||
| uniq -u
|
| uniq -u \
|
||||||
|
| prep
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ TARGET_PATH=${TARGET_PATH:=.}
|
|||||||
cd "$TARGET_PATH"
|
cd "$TARGET_PATH"
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
DIRS=($(git listall ${RECURSIVE}))
|
DIRS=($(git listall -d ${RECURSIVE}))
|
||||||
|
|
||||||
# inside a repo...
|
# inside a repo...
|
||||||
if [ -d ./.git ] ; then
|
if [ -d ./.git ] ; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user