Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find statement to get list of files for OTRS SOPM Filelist
# Explanation:
#
# find
# -name .git -prune -o = skip everything with .git in the name
# -type d -o = skip folders
# -name .DS_Store -prune -o = skip Mac OS X .DS_Store files
# -name "*.sopm" -prune -o = skip SOPM file itself
# -print
#
# sed
# -e "s/^\.\///" = remove the ./ prefix so we can easy work with it
find . -name .git -prune -o -type d -o -name .DS_Store -prune -o -name "*.sopm" -prune -o -print | sed -e "s/^\.\///"
# The result list can be manipulated with e.g. SublimeText multi line edit:
# Prefix = <File Location="
# Suffix = Permission="***"/> (use correct permissions, e.g. 644 for perl modules or 755 for executables)
@martini

This comment has been minimized.

Copy link

commented Dec 9, 2014

++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.