]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-invoke-editor.scm
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / scripts / lilypond-invoke-editor.scm
old mode 100755 (executable)
new mode 100644 (file)
index 0d8ca9e..d847be2
@@ -4,7 +4,7 @@
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2005--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2005--2007 Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;; gui debug helper
 ;; (define (exit x) (system "sleep 10"))
@@ -127,15 +127,16 @@ Options:
 
 (define (strip-framework-path var)
   (define pat "lilypond/usr")
-  (let*
-      ((val (getenv var))
-       (paths (string-split val #\:))
-       (without (remove (lambda (s) (string-contains s pat))
-                       paths)))
-
-    (if (not (= (length without)
-               (length paths)))
-       (setenv var (string-join without ":")))))
+  (if (getenv var)
+      (let*
+         ((val (getenv var))
+          (paths (string-split val #\:))
+          (without (remove (lambda (s) (string-contains s pat))
+                           paths)))
+       
+       (if (not (= (length without)
+                   (length paths)))
+           (setenv var (string-join without ":"))))))
 
 (define (main args)
   (let ((files (parse-options args)))