diff --git a/.repo/list-private b/.repo/list-private new file mode 100755 index 0000000..84be31e --- /dev/null +++ b/.repo/list-private @@ -0,0 +1,29 @@ +#!/usr/bin/python + +# Python version of the following shell script: +# find . -maxdepth 1 \ +# -type d \ +# -not -exec test -e "{}/.git" ';' \ +# -not -path "*/\.*" \ +# -print \ +# | sed "s/\.\///g" \ +# | sort + +import os + +forks = [] + +for item in os.listdir("."): + # skip hidden directories, files, and submodules + if ( + not item.startswith(".") + and os.path.isdir(item) + and not os.path.isfile(f"{item}/.git") + ): + forks.append(item) + +# sort alphabetically +forks.sort() + +for fork in forks: + print(fork) diff --git a/Makefile b/Makefile index ba69e49..d09b315 100644 --- a/Makefile +++ b/Makefile @@ -48,3 +48,7 @@ help: ## Display this help rewrite: ## Rewrite .gitmodules @.repo/rewrite-gitmodules +.PHONY: list-private-packages +list-private: ## List private packages in repository + @.repo/list-private +