From 661a2ab5a84b70f3075777599b27e19f06b49e8a Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 30 Mar 2021 12:59:40 -0500 Subject: Create a variable with only the major minor of the perl version and use it in the configure options. --- chapter7/perl.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'chapter7') 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 -- cgit v1.2.3-54-g00ecf