summaryrefslogtreecommitdiff
path: root/perlFunktionen
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-25 08:53:22 +0200
committerErich Eckner <git@eckner.net>2017-09-25 08:53:22 +0200
commitfeb2aceffad0ef60b1456c1b45bfff4b067e6138 (patch)
tree888e634caa331a1581b0f2dd2b139d87e8f1f187 /perlFunktionen
parentc30c273976c6b8108d62418141f6297ea43d7e43 (diff)
downloadarchlinuxewe-feb2aceffad0ef60b1456c1b45bfff4b067e6138.tar.xz
nimm leeres meta anstatt abzubrechen wenn meta.yml nicht auffindbar
Diffstat (limited to 'perlFunktionen')
-rwxr-xr-xperlFunktionen58
1 files changed, 32 insertions, 26 deletions
diff --git a/perlFunktionen b/perlFunktionen
index 1ee1137c0..5e631dc55 100755
--- a/perlFunktionen
+++ b/perlFunktionen
@@ -65,34 +65,40 @@ versteheMetaYml() {
if ! tar -tzf "${archiv}" "${_distdir}/META.yml"
then
- return 1
- fi
- echo "META.yml lesen ..."
-
- meta="$(
- tar -Oxzf "${archiv}" "${_distdir}/META.yml" | \
- tr '\r' ' ' | \
- grep -v "^\s*file:" | \
- grep -v "^version:" | \
- sed '
- :begin;
- $!N;
- s@^\(\S.*\)\n\s\+\(\S.*\)$@\1 \2@;
- tbegin;
- P;
- D
- ' | \
- sed "/^provides: /s@\(\s\S\+\):\s\+version:\s\+'\?v\?\([0-9.]\+\)'\?@\L\1=\2@g" | \
- sed "/^provides: /s@\s@ @g" | \
- sed "/^provides: /s@\(\s[^= ]\+\):\+\(\s\|\$\)@\L\1=${pkgver}\2@g" | \
- sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)\.\([[:digit:]]\{3\}\)'\?\(\s\|\$\)@\1\2.\3.0\4@" | \
- sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)\.\([[:digit:]]\{3\}\)\([[:digit:]]\+\)'\?\(\s\|\$\)@\1\2.\3.\4\5@" | \
- sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)[._]0*\([1-9][[:digit:]]*\)[._]0*\([1-9][[:digit:]]*\)'\?\(\s\|\$\)@\1\2.\3.\4\5@" | \
- sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)[._]0*\([1-9][[:digit:]]*\)[._]0\+'\?\(\s\|\$\)@\1\2.\3.0\4@"
- )"
+ unset meta
+
+ else
+
+ echo "META.yml lesen ..."
+
+ meta="$(
+ tar -Oxzf "${archiv}" "${_distdir}/META.yml" | \
+ tr '\r' ' ' | \
+ grep -v "^\s*file:" | \
+ grep -v "^version:" | \
+ sed '
+ :begin;
+ $!N;
+ s@^\(\S.*\)\n\s\+\(\S.*\)$@\1 \2@;
+ tbegin;
+ P;
+ D
+ ' | \
+ sed "/^provides: /s@\(\s\S\+\):\s\+version:\s\+'\?v\?\([0-9.]\+\)'\?@\L\1=\2@g" | \
+ sed "/^provides: /s@\s@ @g" | \
+ sed "/^provides: /s@\(\s[^= ]\+\):\+\(\s\|\$\)@\L\1=${pkgver}\2@g" | \
+ sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)\.\([[:digit:]]\{3\}\)'\?\(\s\|\$\)@\1\2.\3.0\4@" | \
+ sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)\.\([[:digit:]]\{3\}\)\([[:digit:]]\+\)'\?\(\s\|\$\)@\1\2.\3.\4\5@" | \
+ sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)[._]0*\([1-9][[:digit:]]*\)[._]0*\([1-9][[:digit:]]*\)'\?\(\s\|\$\)@\1\2.\3.\4\5@" | \
+ sed "s@\(\sperl:\s\+\)'\?\([[:digit:]]\+\)[._]0*\([1-9][[:digit:]]*\)[._]0\+'\?\(\s\|\$\)@\1\2.\3.0\4@"
+ )"
+
+ echo -n "... fertig, "
+
+ fi
- echo "... fertig, verarbeiten ..."
+ echo "verarbeiten ..."
set +e