from pathlib import Path


def make_wrapper_name(path: Path) -> str:
    """Return an escaped filename to be used in source wrappers.
    Reverses the order of parts from the original filepath for
    easier readability
    """
    escaped = '_'.join(reversed(path.parts))
    for char in '. /':
        escaped = escaped.replace(char, '_')
    return escaped + '.sh'