build: add script that lists private packages in repository
This commit is contained in:
parent
69938d64ea
commit
98541def65
|
@ -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)
|
Loading…
Reference in New Issue