]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/windows/lily-python.sh
patch::: 1.3.149.jcn1
[lilypond.git] / Documentation / windows / lily-python.sh
index c8f71313c6e72251f117512be9813f23f49d2c40..fdefba7d4b9e99bfff5f70ec2d919d60bae84106 100644 (file)
@@ -1,3 +1,20 @@
-#!/bin/bash
+#!@SHELL@
+# /etc/profile.d/post-python.sh -- Check for Python
 
-PATH="//c/Program Files/Python:$PATH"
+# Educated guess in case we have no regtool
+a="//c/Program Files/Python"
+
+# Registry entry
+reg="$(regtool -q get 'HKLM\Software\Python\PythonCore\1.5\InstallPath\')"
+b="$(cygpath -u ""$reg"")"
+
+# Where we installed it
+c="/usr/windows/Python"
+
+for i in "$a" "$b" "$c"; do
+       if [ -d "$i" ]; then
+               python="$i"
+       fi
+done
+
+PATH="$python:$PATH"