def globulize_filepath(filepath):
    """ Take a filepath defined and if a specific file is not specified, make it greedy in glob format. """

    # remove leading slash
    if filepath[0] == "/":
        filepath = filepath[1:]

    # is targeting a file specifically, no change needed
    if "." in filepath.split("/")[-1]:
        return filepath

    # /src/ --> /src/*
    if filepath[-1] == "/":
        filepath += "*"
    # /src --> /src/*
    elif filepath[-1] != "*":
        filepath += "/*"

    return filepath