build: add script that lists private packages in repository
This commit is contained in:
parent
69938d64ea
commit
98541def65
2 changed files with 33 additions and 0 deletions
29
.repo/list-private
Executable file
29
.repo/list-private
Executable file
|
@ -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)
|
4
Makefile
4
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue