1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Use git ls-files to list files to encrypt

By using git ls-files instead of bash we can support ** also on macOS where the
included bash version (3) doesn't support globstar.
This commit is contained in:
Erik Flodin
2024-11-24 22:56:07 +01:00
parent 216d49ceef
commit 4511f5d9c6
3 changed files with 28 additions and 59 deletions

View File

@@ -105,7 +105,8 @@ def create_test_encrypt_data(paths):
edata += "dirwild*\n"
paths.work.join("dirwildcard/file1").write("", ensure=True)
paths.work.join("dirwildcard/file2").write("", ensure=True)
expected.add("dirwildcard")
expected.add("dirwildcard/file1")
expected.add("dirwildcard/file2")
# excludes
edata += "exclude*\n"
@@ -186,9 +187,7 @@ def run_parse_encrypt(runner, paths, skip_parse=False, twice=False):
YADM_WORK={paths.work}
export YADM_WORK
{parse_cmd}
export ENCRYPT_INCLUDE_FILES
export PARSE_ENCRYPT_SHORT
env
echo PARSE_ENCRYPT_SHORT=$PARSE_ENCRYPT_SHORT
echo EIF_COUNT:${{#ENCRYPT_INCLUDE_FILES[@]}}
for value in "${{ENCRYPT_INCLUDE_FILES[@]}}"; do
echo "EIF:$value"