diff options
author | Erich Eckner <git@eckner.net> | 2016-04-29 17:05:40 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-29 17:05:40 +0200 |
commit | 4ae58bdb9ae926c9ab9751cf4871f38a35b3d4b5 (patch) | |
tree | e599933fd2fae57bb8f45611b27ed59c9454a4e0 /neuesPerlPaket | |
parent | 19f3854748697217bc952f20eda090804e15941c (diff) | |
download | archlinuxewe-4ae58bdb9ae926c9ab9751cf4871f38a35b3d4b5.tar.xz |
neuesPerlPaket aufgeräumt, Substitutionen nach perlSubstitutionen ausgelagert
Diffstat (limited to 'neuesPerlPaket')
-rwxr-xr-x | neuesPerlPaket | 49 |
1 files changed, 11 insertions, 38 deletions
diff --git a/neuesPerlPaket b/neuesPerlPaket index 05d430452..8ddcf7695 100755 --- a/neuesPerlPaket +++ b/neuesPerlPaket @@ -6,42 +6,16 @@ then exit 1 fi -declare -A substitutionen - -substitutionen["perl"]="%skip" -substitutionen["b"]="%skip" -substitutionen["strict"]="%skip" -substitutionen["warnings"]="%skip" -substitutionen["ipc-open3"]="%skip" -substitutionen["filehandle"]="%skip" -substitutionen["file-glob"]="%skip" -substitutionen["file-find"]="%skip" - -substitutionen["moo-role"]="moo" - -substitutionen["test-more"]="test-simple" -substitutionen["test-builder"]="test-simple" -substitutionen["test-builder-tester"]="test-simple" - -substitutionen["http-headers"]="http-message" -substitutionen["http-request-common"]="http-message" - -substitutionen["io-file"]="io" -substitutionen["io-handle"]="io" - -substitutionen["file-spec-functions"]="pathtools" -substitutionen["file-spec"]="pathtools" - -substitutionen["list-util"]="scalar-list-utils" -substitutionen["scalar-util"]="scalar-list-utils" - -substitutionen["pod-coverage-countparents"]="pod-coverage" - -substitutionen["pod-find"]="pod-parser" - -substitutionen["pod-eventual-simple"]="pod-eventual" - -substitutionen["compress-zlib"]="io-compress" +substituiere() { + erg="$( + cat "$(dirname "${me}")/perlSubstitutionen" | \ + sed 's|#.*$||' | \ + grep "\s$1\(\s\|\$\)" | \ + cut -d ':' -f 1 + )" + [ -z "${erg}" ] && erg="$1" + key="${erg}" +} cpanName="$(echo "$1" | sed 's|::|-|g')" url="https://metacpan.org/release/${cpanName}" @@ -116,8 +90,7 @@ do sed "s|::|-|g" | \ tr "[[:upper:]]" "[[:lower:]]" )" - [ -n "${substitutionen["${key}"]}" ] && \ - key="${substitutionen["${key}"]}" + substituiere "${key}" [ "${key}" == "%skip" ] && continue |