Advertisement
zamotivator

Untitled

Jul 26th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. diff --git a/clientApiR/fixSwig.sh b/clientApiR/fixSwig.sh
  2. index 725e8aa..78c8e59 100755
  3. --- a/clientApiR/fixSwig.sh
  4. +++ b/clientApiR/fixSwig.sh
  5. @@ -21,12 +21,24 @@ fi
  6.  
  7.  
  8. SWIG_VERSION=`swig -version | fgrep Version | awk '{print $3}'`
  9. -SWIG_FILE="/usr/local/share/swig/${SWIG_VERSION}/r/rfragments.swg"
  10.  
  11. -echo "checking for the $SWIG_FILE file"
  12. -LINE=`fgrep 'R_VERSION >= R_Version(2,7,0)' $SWIG_FILE`
  13. -FOUND_LINE=$?
  14. +function check_swig_file()
  15. +{
  16. + echo "checking for the $SWIG_FILE file"
  17. + LINE=`fgrep 'R_VERSION >= R_Version(2,7,0)' $SWIG_FILE`
  18. + FOUND_LINE=$?
  19. +}
  20. +
  21. +SWIG_FILE="/usr/share/swig/${SWIG_VERSION}/r/rfragments.swg"
  22. +check_swig_file
  23. +if [ ! "$FOUND_LINE" -eq "0" ]; then
  24. + SWIG_FILE="/usr/local/share/swig/${SWIG_VERSION}/r/rfragments.swg"
  25. + check_swig_file
  26. +fi
  27. +
  28. if [ ! "$FOUND_LINE" -eq "0" ]; then
  29. + SWIG_FILE="/usr/share/swig/${SWIG_VERSION}/r/rfragments.swg"
  30. +
  31. echo "something is wrong with /usr/local/share/swig/2.0.1/r/rfragments.swg"
  32. echo "cannot check or fix your swig installation for recent R versions"
  33. exit 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement