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

Commit

Permalink
These scripts don't necessarily need to know where SAGE_ROOT is, just…
Browse files Browse the repository at this point in the history
… SAGE_LOCAL

(SAGE_LOCAL may not even be *in* SAGE_ROOT)
  • Loading branch information
embray committed May 5, 2017
1 parent 42aeeae commit b60823b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/bin/sage-rebase.bat
Expand Up @@ -2,23 +2,23 @@
rem Author:
rem * Jean-Pierre Flori <jean-pierre.flori@ssi.gouv.fr>
rem
rem Rebase all dlls in the SAGE_ROOT directory (and its subdirectories),
rem Rebase all dlls in the SAGE_LOCAL directory (and its subdirectories),
rem but do not touch the ones already stored in the system database,
rem and do not update it.
rem Note that subsequent calls to 'rebaseall' will not update the Sage dlls.
rem
rem Invoke this script from a Windows command prompt,
rem after adjusting SAGE_ROOT to the Windows location of the Sage directory,
rem after adjusting SAGE_LOCAL to the Windows location of the Sage directory,
rem and, if Cygwin is installed in a non-standard location,
rem adjusting CYGWIN_ROOT.

set CYGWIN_ROOT=C:\cygwin\
set SAGE_ROOT=C:\cygwin\usr\local\sage\
set SAGE_LOCAL=C:\cygwin\usr\local\sage\

rem Make sure bash can be called from MSDOS prompt:
path %CYGWIN_ROOT%\bin;%path%
rem Suppress warning about MSDOS-style path:
set CYGWIN=%CYGWIN% nodosfilewarning
rem Call the bash script to do the real work:
cd %SAGE_ROOT%
bash .\local\bin\sage-rebase.sh
cd %SAGE_LOCAL%
bash bin\sage-rebase.sh
6 changes: 3 additions & 3 deletions src/bin/sage-rebase.sh
Expand Up @@ -3,14 +3,14 @@
# Author:
# * Jean-Pierre Flori <jean-pierre.flori@ssi.gouv.fr>
#
# Rebase all dlls in the SAGE_ROOT directory (and its subdirectories),
# Rebase all dlls in the SAGE_LOCAL directory (and its subdirectories),
# but do not touch the ones already stored in the system database,
# and do not update it.
# Note that subsequent calls to 'rebaseall' will not update the Sage dlls.
#
# Invoke this script from a shell after going to the SAGE_ROOT directory.
# Invoke this script from a shell after going to the SAGE_LOCAL directory.

echo "Getting list of dlls. This may take a while..."
/bin/find local -name "*.dll" -o -name "*.so" -o -name "*.fas" > /tmp/sage-dlls.lst
/bin/find . -name "*.dll" -o -name "*.so" -o -name "*.fas" > /tmp/sage-dlls.lst
echo "Now rebasing..."
/bin/rebase -O -T /tmp/sage-dlls.lst
10 changes: 5 additions & 5 deletions src/bin/sage-rebaseall.bat
Expand Up @@ -3,27 +3,27 @@ rem Authors:
rem * Dmitrii Pasechnik <dimpase@gmail.com>
rem * Jean-Pierre Flori <jean-pierre.flori@ssi.gouv.fr>
rem
rem Rebase all dlls in the SAGE_ROOT directory (and its subdirectories),
rem Rebase all dlls in the SAGE_LOCAL directory (and its subdirectories),
rem as well as the ones already stored in the system database,
rem and update the database.
rem This system-wide database is located in '/etc/rebase.db.i386' and
rem includes the Cygwin system dlls.
rem
rem Invoke this script from a Windows command prompt,
rem after adjusting SAGE_ROOT to the Windows location of the Sage directory,
rem after adjusting SAGE_LOCAL to the Windows location of the Sage directory,
rem and, if Cygwin is installed in a non-standard location,
rem adjusting CYGWIN_ROOT.
rem Ensure that no other Cygwin processes are currently running.
rem Note that you need write access to the system-wide rebase database
rem (which usually means admin rights).

set CYGWIN_ROOT=C:\cygwin\
set SAGE_ROOT=C:\cygwin\usr\local\sage\
set SAGE_LOCAL=C:\cygwin\usr\local\sage\

rem Make sure dash can be called from MSDOS prompt:
path %CYGWIN_ROOT%\bin;%path%
rem Suppress warning about MSDOS-style path:
set CYGWIN=%CYGWIN% nodosfilewarning
rem Call the dash script to do the real work:
cd %SAGE_ROOT%
dash .\local\bin\sage-rebaseall.sh
cd %SAGE_LOCAL%
dash bin\sage-rebaseall.sh
6 changes: 3 additions & 3 deletions src/bin/sage-rebaseall.sh
Expand Up @@ -5,18 +5,18 @@
# * Dmitrii Pasechnik <dimpase@gmail.com>
# * Jean-Pierre Flori <jean-pierre.flori@ssi.gouv.fr>
#
# Rebase all dlls in the SAGE_ROOT directory (and its subdirectories)
# Rebase all dlls in the SAGE_LOCAL directory (and its subdirectories)
# as well as the ones already stored in the system database,
# and update the database.
# This system-wide database is located in '/etc/rebase.db.i386' and
# includes the Cygwin system dlls.
#
# Invoke this script from a dash shell after going to the SAGE_ROOT directory.
# Invoke this script from a dash shell after going to the SAGE_LOCAL directory.
# Ensure that no other Cygwin processes are currently running.
# Note that you need write access to the system-wide rebase database
# (which usually means admin rights).

echo "Getting list of dlls. This may take a while..."
/bin/find local -name "*.dll" -o -name "*.so" -o -name "*.fas" > /tmp/sage-dlls.lst
/bin/find . -name "*.dll" -o -name "*.so" -o -name "*.fas" > /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 b60823b

Please sign in to comment.