diff options
author | Yang Tse <yangsita@gmail.com> | 2012-04-12 19:13:23 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-04-12 19:13:23 +0200 |
commit | e19917296f360159975214bcabbaf1713956c356 (patch) | |
tree | e6fff1e5fcdf53b8e6df912e00524912a514a084 | |
parent | 8ed40acac62d9de0903ea1b8a0ee8ee563e9e211 (diff) |
OS400/initscript.sh: fix db2_name() module name generation
Allow repeatable file name length reduction on file names with underscore or
dash characters. This is done in order to better support libcurl's existing
source file names and allow OS/400 package to build out of the box again.
-rw-r--r-- | packages/OS400/initscript.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh index 97e978158..d28a8db11 100644 --- a/packages/OS400/initscript.sh +++ b/packages/OS400/initscript.sh @@ -157,6 +157,10 @@ db2_name() basename "${1}" | tr 'a-z-' 'A-Z_' | sed -e 's/\..*//' \ + -e 's/\([^_]\)[^_]*_\(.*\)/\1\2/' \ + -e 's/\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3/' \ + -e 's/\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3\4/' \ + -e 's/\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3\4\5/' \ -e 's/^\(..........\).*/\1/' } |