Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/clientApiR/fixSwig.sh b/clientApiR/fixSwig.sh
- index 725e8aa..78c8e59 100755
- --- a/clientApiR/fixSwig.sh
- +++ b/clientApiR/fixSwig.sh
- @@ -21,12 +21,24 @@ fi
- SWIG_VERSION=`swig -version | fgrep Version | awk '{print $3}'`
- -SWIG_FILE="/usr/local/share/swig/${SWIG_VERSION}/r/rfragments.swg"
- -echo "checking for the $SWIG_FILE file"
- -LINE=`fgrep 'R_VERSION >= R_Version(2,7,0)' $SWIG_FILE`
- -FOUND_LINE=$?
- +function check_swig_file()
- +{
- + echo "checking for the $SWIG_FILE file"
- + LINE=`fgrep 'R_VERSION >= R_Version(2,7,0)' $SWIG_FILE`
- + FOUND_LINE=$?
- +}
- +
- +SWIG_FILE="/usr/share/swig/${SWIG_VERSION}/r/rfragments.swg"
- +check_swig_file
- +if [ ! "$FOUND_LINE" -eq "0" ]; then
- + SWIG_FILE="/usr/local/share/swig/${SWIG_VERSION}/r/rfragments.swg"
- + check_swig_file
- +fi
- +
- if [ ! "$FOUND_LINE" -eq "0" ]; then
- + SWIG_FILE="/usr/share/swig/${SWIG_VERSION}/r/rfragments.swg"
- +
- echo "something is wrong with /usr/local/share/swig/2.0.1/r/rfragments.swg"
- echo "cannot check or fix your swig installation for recent R versions"
- exit 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement