Advertisement
leathan

Custom perl ubuntu 12.04 fix

Jun 19th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.50 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # change INC to have Ubuntu's deb/apt calls to custom perl use
  4. # old perl's deb perl stuff
  5.  
  6. custom=$( env -i perl -V |\
  7. sed -n -e '/^ *@INC/,${/usr\/local\/lib\/perl5\/5.*[0-9]$/p}' )
  8.  
  9. echo Custom perl is in $custom
  10.  
  11. pushd /usr/share/perl5 > /dev/null
  12. for f in $( echo * )
  13. do ls ${custom}/$f 2>/dev/null ||\
  14. sudo ln -s /usr/share/perl5/$f ${custom}/$f
  15. echo File or dir here\: $f
  16. done
  17.  
  18. # not sure if we need to also do for /usr/local/lib/perl5/[older perl] stuff
  19.  
  20. popd > /dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement