Megatest

Diff
Login

Differences From Artifact [36dac86f8a]:

To Artifact [8b3b573c83]:


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
     (prefix nanomsg nmsg:)
     (prefix sqlite3 sqlite3:)
     pkts (prefix dbi dbi:)
     )

(declare (unit common))
(include "common_records.scm")


;; (require-library margs)
;; (include "margs.scm")

;; (define old-exit exit)
;; 
;; (define (exit . code)







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
     (prefix nanomsg nmsg:)
     (prefix sqlite3 sqlite3:)
     pkts (prefix dbi dbi:)
     )

(declare (unit common))
(include "common_records.scm")
(declare (uses configf))

;; (require-library margs)
;; (include "margs.scm")

;; (define old-exit exit)
;; 
;; (define (exit . code)
205
206
207
208
209
210
211




212
213
214
215
216
217
218
219
220
221
222
223



224
225
226
227
228
229
230
231
232
233
                            2)))))
  (let ((resolve-pathname-broken?
         (or (> chicken-release-number 4)
             (and (eq? 4 chicken-release-number) (> chicken-major-version 9)))))
    (if resolve-pathname-broken?
        (define ##sys#expand-home-path pathname-expand))))
      




(define (realpath x) (resolve-pathname  (pathname-expand (or x "/dev/null")) ))

(define (common:get-this-exe-fullpath #!key (argv (argv)))
  (let* ((this-script
          (cond
           ((and (> (length argv) 2)
                 (string-match "^(.*/csi|csi)$" (car argv))
                 (string-match "^-(s|ss|sx|script)$" (cadr argv)))
            (caddr argv))
           (else (car argv))))
         (fullpath (realpath this-script)))
    fullpath))



(define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
(define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
(define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))






(defstruct remote







>
>
>
>
|


|
<
|
|
|
|
|

|
>
>
>
|
|
|







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
                            2)))))
  (let ((resolve-pathname-broken?
         (or (> chicken-release-number 4)
             (and (eq? 4 chicken-release-number) (> chicken-major-version 9)))))
    (if resolve-pathname-broken?
        (define ##sys#expand-home-path pathname-expand))))
      
(define (realpath x)
  (handle-exceptions
   exn
   #f
   (resolve-pathname  (pathname-expand (or x "/dev/null")))))

(define (common:get-this-exe-fullpath #!key (argv (argv)))
  (let* ((this-script (cond

                       ((and (> (length argv) 2)
                             (string-match "^(.*/csi|csi)$" (car argv))
                             (string-match "^-(s|ss|sx|script)$" (cadr argv)))
                        (caddr argv))
                       (else (car argv))))
         (fullpath (realpath this-script)))
    (or fullpath
        (common:which this-script)))) ;; fall back on looking in the PATH for matching tool

;; Let's not get these vars unless needed.
;; (define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
;; (define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
;; (define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))






(defstruct remote