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 | |
parent | 19f3854748697217bc952f20eda090804e15941c (diff) | |
download | archlinuxewe.git.save-4ae58bdb9ae926c9ab9751cf4871f38a35b3d4b5.tar.xz |
neuesPerlPaket aufgeräumt, Substitutionen nach perlSubstitutionen ausgelagert
-rwxr-xr-x | neuesPerlPaket | 49 | ||||
-rw-r--r-- | perlSubstitutionen | 12 |
2 files changed, 23 insertions, 38 deletions
diff --git a/neuesPerlPaket b/neuesPerlPaket index 05d43045..8ddcf769 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 diff --git a/perlSubstitutionen b/perlSubstitutionen new file mode 100644 index 00000000..4934f9d5 --- /dev/null +++ b/perlSubstitutionen @@ -0,0 +1,12 @@ +%skip: perl b strict warnings ipc-open3 filehandle file-glob file-find +yaml-syck: json-syck +moo: moo-role +test-simple: test-more test-builder test-builder-tester +http-message: http-headers http-request-common +io: io-file io-handle +pathtools: file-spec-functions file-spec +scalar-list-utils: list-util scalar-util +pod-coverage: pod-coverage-countparents +pod-parser: pod-find +pod-eventual: pod-eventual-simple +io-compress: compress-zlib |