Skip to content

Add check in publish-ectd-bundle.yaml to ensure files/folders are lowercase #134

@parmsam-pfizer

Description

@parmsam-pfizer

https://github.com/RConsortium/submissions-pilot5-datasetjson/blob/main/.github/workflows/publish-ectd-bundle.yaml

Example code

Here's terminal code that could be used to list all non-lowercase files, maybe via nix-shell --run:

find . | grep -v -E 'README|Rproj' | awk -F/ '{if ($NF != tolower($NF)) print $0}'

Explanation

awk -F/ '{if ($NF != tolower($NF)) print $0}'

  • -F/: Sets the field separator to /, so each part of the path is a field (e.g., in ./folder/File.txt, fields are ., folder, File.txt).
  • $NF: Refers to the last field in the line (i.e., the file or directory name, not the path).
  • tolower($NF): Converts the last field to all lowercase.
  • if ($NF != tolower($NF)) print $0: Checks if the last field is not all lowercase. If so, prints the whole path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions