diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-30 12:59:40 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-30 12:59:40 -0500 |
commit | 661a2ab5a84b70f3075777599b27e19f06b49e8a (patch) | |
tree | 0d0a8464d4f6c05b6bb6ef671c5423beadff8810 | |
parent | 57671253b64d9144d7f39137d654edb7555df62c (diff) |
Create a variable with only the major minor of the perl version and use it in the configure options.
-rw-r--r-- | chapter7/perl.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chapter7/perl.sh b/chapter7/perl.sh index 2cb5245..970e17c 100644 --- a/chapter7/perl.sh +++ b/chapter7/perl.sh @@ -1,11 +1,15 @@ +#!/bin/bash + +MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")" + sh Configure -des \ -Dprefix=/usr \ -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/5.32/core_perl \ - -Darchlib=/usr/lib/perl5/5.32/core_perl \ - -Dsitelib=/usr/lib/perl5/5.32/site_perl \ - -Dsitearch=/usr/lib/perl5/5.32/site_perl \ - -Dvendorlib=/usr/lib/perl5/5.32/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/5.32/vendor_perl && + -Dprivlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \ + -Darchlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \ + -Dsitelib=/usr/lib/perl5/"${MAJMIN}"/site_perl \ + -Dsitearch=/usr/lib/perl5/"${MAJMIN}"/site_perl \ + -Dvendorlib=/usr/lib/perl5/"${MAJMIN}"/vendor_perl \ + -Dvendorarch=/usr/lib/perl5/"${MAJMIN}"/vendor_perl && make && make -j1 install |