Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Accept the path to SAGE_LOCAL as an argument (this is useful for runn…
Browse files Browse the repository at this point in the history
…ing outside the Sage shell).

Exclude /var/tmp from the list of DLLs to rebase.
  • Loading branch information
embray committed May 5, 2017
1 parent e2905b1 commit 5d8910c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/bin/sage-rebase.sh
Expand Up @@ -9,8 +9,17 @@
# Note that subsequent calls to 'rebaseall' will not update the Sage dlls.
#
# Invoke this script from a shell after going to the SAGE_LOCAL directory.
SAGE_LOCAL=${1%/}

if [ -z "$SAGE_LOCAL" ]; then
# Assume we are in $SAGE_LOCAL by default (the old behavior of this script)
SAGE_LOCAL=.
fi

FINDFLAGS="-type f ( -name *.dll -o -name *.so -o -name *.fas ) -print"
FINDFLAGS="$FINDFLAGS -o -path "$SAGE_LOCAL"/var/tmp -prune"

echo "Getting list of dlls. This may take a while..."
/bin/find . -name "*.dll" -o -name "*.so" -o -name "*.fas" > /tmp/sage-dlls.lst
/bin/find "$SAGE_LOCAL" $FINDFLAGS > /tmp/sage-dlls.lst
echo "Now rebasing..."
/bin/rebase -O -T /tmp/sage-dlls.lst
12 changes: 11 additions & 1 deletion src/bin/sage-rebaseall.sh
Expand Up @@ -16,7 +16,17 @@
# Note that you need write access to the system-wide rebase database
# (which usually means admin rights).

SAGE_LOCAL=${1%/}

if [ -z "$SAGE_LOCAL" ]; then
# Assume we are in $SAGE_LOCAL by default (the old behavior of this script)
SAGE_LOCAL=.
fi

FINDFLAGS="-type f ( -name *.dll -o -name *.so -o -name *.fas ) -print"
FINDFLAGS="$FINDFLAGS -o -path "$SAGE_LOCAL"/var/tmp -prune"

echo "Getting list of dlls. This may take a while..."
/bin/find . -name "*.dll" -o -name "*.so" -o -name "*.fas" > /tmp/sage-dlls.lst
/bin/find "$SAGE_LOCAL" $FINDFLAGS > /tmp/sage-dlls.lst
echo "Now rebasing..."
/bin/rebaseall -s dll -s exe -s so -s fas -T /tmp/sage-dlls.lst

0 comments on commit 5d8910c

Please sign in to comment.