# HG changeset patch
# User Dmitrii Pasechnik
# Date 1359437758 28800
# Node ID 528d94a62260bbc385be18b17526893bf0a1b490
# Parent 91a024ac9926c44baca570ba3943a30b92ac25c8
Cygwin rebasing scripts/batchfiles fixed
diff git a/sagerebase_sage.bat b/sagerebase_sage.bat
new file mode 100644
 /dev/null
+++ b/sagerebase_sage.bat
@@ 0,0 +1,23 @@
+@ECHO OFF
+rem Author: Dmitrii Pasechnik
+rem Rebase all dlls in SAGE_ROOT directory (and subdirectories)
+rem and the Cygwin system dlls.
+rem
+rem Invoke this script from Windows command prompt,
+rem after adjusting SAGE_ROOT to the Windows location of sage directory,
+rem and, if your Cygwin is in nonstandard location, adjusting CYGWIN_BIN
+
+set SAGE_ROOT=C:\cygwin\usr\local\src\sage\sage5.7.beta0
+set CYGWIN_BIN=C:\cygwin\bin\
+
+rem make sure dash can be called from MSDOS prompt:
+set PATH=%PATH%%CYGWIN_HOME%
+rem suppress warning about MSDOSstyle PATH
+set CYGWIN=nodosfilewarning
+rem call the dash script to do the real work
+rem dash %SAGE_ROOT%\local\bin\s.sh
+echo Rebase all dlls in %SAGE_ROOT% directory
+echo (and subdirectories) and Cygwin dlls
+cd %SAGE_ROOT%
+rem %CYGWIN_BIN%dash %SAGE_ROOT%\local\bin\s.sh
+%CYGWIN_BIN%dash %SAGE_ROOT%\local\bin\sagerebase_sage.sh
diff git a/sagerebase_sage.sh b/sagerebase_sage.sh
 a/sagerebase_sage.sh
+++ b/sagerebase_sage.sh
@@ 1,15 +1,20 @@
#!/usr/bin/env bash
+#!/bin/dash
# Author: Gary Zablackis
+# Modified by: Dmitrii Pasechnik
# Rebase all dlls in the current sage directory (and subdirectories)
# This is needed when installing SAGE binaries under Windows.
+# Invoke this script from Windows command prompt, as follows :
+# (assuming that SAGE_ROOT is set to the Windows location of sage dir,
+# and that Cygwin's bin directry (usually C:\cygin\bin) is in your
+# Windows path)
+#
+# > dash %SAGE_ROOT%\local\bin\sagerebase_sage.sh
+# (to suppress a warinig about MSDOSstyle path, set
+# CYGWIN to nodosfilewarning)
+#
+echo "Getting list of dlls...This may take awhile..."
+/bin/find name *.dll > /tmp/Sagedlls.lst
+/bin/rebaseall T /tmp/Sagedlls.lst
# It is currently not yet deployed, since I don't know when/how/what
# to do with it.  William Stein

echo "Getting list of dlls...This may take awhile..."

/bin/find name *.dll > Sagedlls.lst

rebaseall T Sagedlls.lst
+exit