Megatest

Check-in [f252549946]
Login
Overview
Comment:updatess to spublish
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: f252549946129191c6df3d0562939f97e84ab86a
User & Date: pjhatwal on 2016-01-13 14:40:42
Other Links: branch diff | manifest | tags
Context
2016-01-26
15:51
Cleaned up sretrieve.scm, removed concept of iter and package check-in: 6ec9cabddc user: mrwellan tags: v1.60
2016-01-15
15:55
added tar cmd check-in: 3bf186fbfc user: pjhatwal tags: v1.60
2016-01-13
14:40
updatess to spublish check-in: f252549946 user: pjhatwal tags: v1.60
2016-01-11
16:58
Bump version to v1.6029 check-in: 3aa6e44158 user: icfadm tags: v1.60, v1.6029
Changes

Modified datashare-testing/.sretrieve.config from [e657ec9c50] to [37da93a1c2].

1
2

3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9

-
+







[settings]
base-dir      /tmp/matt/datashare/disk1
base-dir      /tmp/pjhatwal/datashare/disk1
allowed-users matt mrwellan pjhatwal
allowed-chars [0-9a-zA-Z\-\.]+
default-area  megatest

# NOTE: packages-metadir defaults to exe dir if not specified here
# packages-metadir  /tmp/#{getenv USER}/packages

Modified spublish.scm from [18240ec105] to [ed7c9f585a].

136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







        (targ-path (conc target-dir "/" dest-dir "/" targ-file)))
    (if (file-exists? targ-path)
	(begin
	  (print "ERROR: target file already exists, remove it before re-publishing")
	  (exit 1)))
       (if (not(file-exists? dest-dir-path))
	(begin
	  (print "ERROR: target directory "  target-dir " does not exists." )
	  (print "ERROR: target directory " dest-dir-path " does not exists." )
	  (exit 1)))

    (spublish:db-do
     configdat
     (lambda (db)
       (spublish:register-action db "cp" submitter source-path comment)))
    (let* (;; (target-path (configf:lookup "settings" "target-path"))
398
399
400
401
402
403
404
405

406
407
408
409
410






411
412
413
414
415
416
417
398
399
400
401
402
403
404

405
406
407



408
409
410
411
412
413
414
415
416
417
418
419
420







-
+


-
-
-
+
+
+
+
+
+







          (begin 
	     (print "ERROR: Missing arguments; " (string-intersperse args ", "))
	     (exit 1)))
        (let* ((targ-link (car args))
               (link-name (cadr args))  
               (sub-path (string-reverse (string-join (cdr (string-split (string-reverse link-name) "/")) "/"))) 
               (msg         (or (args:get-arg "-m") "")))
               (if(not (equal? sub-path link-name))
               (if (> (string-length(string-trim sub-path)) 0)
                (begin 
                  (print "attempting to create directory " sub-path " in " target-dir)
                    (spublish:validate     target-dir sub-path)
 
                  (spublish:mkdir configdat user target-dir sub-path msg)))
                  (spublish:validate     target-dir sub-path)
                  (print (conc target-dir "/" sub-path ) )
                  (print (directory-exists?(conc target-dir "/" sub-path )))
                  (if (directory-exists?(conc target-dir "/" sub-path ))
                   (print "Target Directory " (conc target-dir sub-path ) " exist!!")
                  (spublish:mkdir configdat user target-dir sub-path msg))))

               (print "attempting to create link " link-name " in " target-dir)
               (spublish:ln configdat user target-dir targ-link link-name msg)))

      ((rm)
       (if (< (length args) 1)
	   (begin 

Modified sretrieve.scm from [d298262aee] to [3f1c95a0fd].

141
142
143
144
145
146
147

148
149
150
151
152
153
154
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155







+







	 (base-dir  (configf:lookup configdat "settings" "base-dir"))
	 (datadir   (conc base-dir "/" area "/" version "/" iteration)))
    (if (or (not base-dir)
	    (not (file-exists? base-dir)))
	(begin
	  (debug:print 0 "ERROR: Bad configuration! base-dir " base-dir " not found")
	  (exit 1)))
    (print datadir)
    (if (not (file-exists? datadir))
	(begin
	  (debug:print 0 "ERROR: Bad version (" version ") or iteration (" iteration "), no data found at " datadir "." )
	  (exit 1)))
    
    (sretrieve:db-do
     configdat
369
370
371
372
373
374
375

376
377
378
379
380
381
382
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384







+







(define (sretrieve:process-action configdat action . args)
  (let* ((base-dir      (configf:lookup configdat "settings" "base-dir"))
	 (user          (current-user-name))
	 (allowed-users (string-split
			 (or (configf:lookup configdat "settings" "allowed-users")
			     "")))
	 (default-area  (configf:lookup configdat "settings" "default-area"))) ;; otherwise known as the package
    
    (if (not base-dir)
	(begin
	  (debug:print 0 "[settings]\nbase-dir /some/path\n\n Is MISSING from the config file!")
	  (exit)))
    (if (null? allowed-users)
	(begin
	  (debug:print 0 "[setings]\nallowed-users user1 user2 ...\n\n Is MISSING from the config file!")