mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +00:00
[#3731] grabber.sh -> grabber.py
This commit is contained in:
parent
5d32aeb38b
commit
b1351e0de8
@ -84,7 +84,7 @@ XMLLINT = find_program('xmllint', required: false)
|
||||
|
||||
CD_AND_RUN = find_program(f'@TOP_SOURCE_DIR@/scripts/cd-and-run.sh')
|
||||
ENV = find_program(f'@TOP_SOURCE_DIR@/scripts/env.sh')
|
||||
GRABBER = find_program(f'@TOP_SOURCE_DIR@/scripts/grabber.sh')
|
||||
GRABBER = find_program(f'@TOP_SOURCE_DIR@/scripts/grabber.py')
|
||||
KEA_MSG_COMPILER = disabler()
|
||||
|
||||
#### Configuration Data
|
||||
|
0
scripts/env.sh
Normal file → Executable file
0
scripts/env.sh
Normal file → Executable file
20
scripts/grabber.py
Executable file
20
scripts/grabber.py
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import fnmatch
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
|
||||
def main(directory, pattern):
|
||||
current_dir = pathlib.Path(directory)
|
||||
files = []
|
||||
for item in current_dir.iterdir():
|
||||
if item.is_file() and fnmatch.fnmatch(item.name, pattern):
|
||||
files.append(item.name)
|
||||
files = sorted(files)
|
||||
for file in files:
|
||||
print(file)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1], sys.argv[2])
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
dir="${1}"
|
||||
pattern="${2}"
|
||||
|
||||
cd "${dir}" || exit 1
|
||||
|
||||
find . -mindepth 1 -maxdepth 1 -type f -name "${pattern}" -printf '%P\n' | sort -V
|
Loading…
x
Reference in New Issue
Block a user