Logo
Explore Help
Sign In
smallm/getshows
1
0
Fork 0
You've already forked getshows
Code Issues Pull Requests Releases Wiki Activity
getshows/latest_perl

16 lines
270 B
Plaintext
Raw Permalink Normal View History

Handle Slackware 14.2 in a cleaner way via pkgsrc Didn't like the hack I was using to work around an old perl before. So when I noticed that using pkgsrc in Slackware pretty soon puts down a recent perl as a dependency to many things I decided that using that would be better than overlaying a newer List::Util version on perl 5.22. This change detects the newest perl on the system at install time and puts that in the script interpreter line. It removes the wrapper that included a library tree with new versions of core Perl modules.
2020-07-03 11:45:52 -04:00
#!/bin/sh
bestv=0
for p in $(whereis perl)
do
if [ "$p" != "${p%bin/perl}" ];
then
v=$($p -V:PERL_VERSION | sed "s/[^']*'//;s/'.*\$//")
if [ $v -gt $bestv ]; then
best=$p
bestv=$($p -V:PERL_VERSION |
sed "s/[^']*'//;s/'.*\$//")
fi
fi
done
echo $best
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.3 Page: 4449ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API