Last active
August 29, 2015 14:10
-
-
Save thorsteneckel/eb7be02d8515c0411c28 to your computer and use it in GitHub Desktop.
Find statement to get list of files for OTRS SOPM Filelist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# | |
# 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
++