mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:17:15 +03:00
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.
This commit is contained in:
parent
8ed40acac6
commit
e19917296f
1 changed files with 4 additions and 0 deletions
|
|
@ -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/'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue