Megatest

Check-in [12da0c130c]
Login
Overview
Comment:Added nice-path as alias for common:nice-path for ease of use in automation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.61
Files: files | file ages | folders
SHA1: 12da0c130cf70005cc2b9e23ef0d1a5e8ec6cb30
User & Date: matt on 2016-05-14 20:23:57
Other Links: branch diff | manifest | tags
Context
2016-05-16
09:48
Removed the New View tab (for now). Added check for var in mt.scm - just guessing at it being a root cause of an archiving issue check-in: 36f8a6a72f user: mrwellan tags: v1.61
2016-05-14
20:23
Added nice-path as alias for common:nice-path for ease of use in automation check-in: 12da0c130c user: matt tags: v1.61
17:39
Remove debugger stuff since feathers can now be used with Chicken 4.11. Replaced resolve-pathname with hack common:nice-path as resolve-pathname is broken in 4.11 check-in: 1f0fec5a83 user: matt tags: v1.61
Changes

Modified common.scm from [f25ae233a2] to [49cb5d370b].

633
634
635
636
637
638
639



640
641
642
643
644
645
646
(define (common:nice-path dir)
  (let ((match (string-match "^(~[^\\/]*)(\\/.*|)$" dir)))
    (if match ;; using ~ for home?
	(common:nice-path (conc (common:read-link-f (cadr match)) "/" (caddr match)))
	(normalize-pathname (if (absolute-pathname? dir)
				dir
				(conc (current-directory) "/" dir))))))




(define (common:read-link-f path)
  (handle-exceptions
      exn
      (begin
	(debug:print 0 "ERROR: command \"/bin/readlink -f " path "\" failed.")
	path) ;; just give up







>
>
>







633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
(define (common:nice-path dir)
  (let ((match (string-match "^(~[^\\/]*)(\\/.*|)$" dir)))
    (if match ;; using ~ for home?
	(common:nice-path (conc (common:read-link-f (cadr match)) "/" (caddr match)))
	(normalize-pathname (if (absolute-pathname? dir)
				dir
				(conc (current-directory) "/" dir))))))

;; make "nice-path" available in config files and the repl
(define nice-path common:nice-path)

(define (common:read-link-f path)
  (handle-exceptions
      exn
      (begin
	(debug:print 0 "ERROR: command \"/bin/readlink -f " path "\" failed.")
	path) ;; just give up