Skip to content

Instantly share code, notes, and snippets.

@macieksk
Created January 17, 2012 15:45
Show Gist options
  • Save macieksk/1627144 to your computer and use it in GitHub Desktop.
Save macieksk/1627144 to your computer and use it in GitHub Desktop.
Fix paths for Sage 4.7.2 binary build so that one can install new packages in R
# To be run inside main sage-4.7.2 dir or alike
# Files TOFIX are usually those:
# local/bin/R local/lib/R/bin/libtool local/lib/R/bin/R local/lib/R/etc/ldpaths local/lib/R/etc/Makeconf local/lib/R/etc/Renviron
#Change here for different versions of sage
ORGPATH="/mnt/usb1/scratch/buildbot/sage/sage-1/sage_binary/build/sage-4.7.2"
DIR=`pwd`
SED="s|$ORGPATH|$DIR|g"
TOFIX=`grep -lI $ORGPATH -R local/ | grep /R`
#echo $SED
#echo $TOFIX
for f in $TOFIX;
do
echo $f: $SED
cp $f $f.org
sed $SED $f.org > $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment