Size: 2135
Comment:
|
← Revision 10 as of 2016-03-04 17:34:02 ⇥
Size: 3736
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Block-01-01 - TEST DIRECTORY SET-UP - ORIG = | ## page was renamed from Block-1A - TEST DIRECTORY SET-UP - ORIG ## page was renamed from Block-01-01 - TEST DIRECTORY SET-UP - ORIG = Block-1A - TEST DIRECTORY SET-UP - ORIG = |
Line 7: | Line 9: |
## BLOCK 01-01 ## | ## BLOCK 1A ## |
Line 14: | Line 16: |
## It clears and re-populates the working directory (orig) ## and updates the .DAT file directory (base/IMAGEFILES) |
## It clears and re-syncs the working directory (orig); adds links to ## App and PS images in the imagefiles directory (base/IMAGEFILES); ## and syncs the shapefiles directory (base/SHAPEFILES) |
Line 23: | Line 26: |
## ORex/ ## DATA/ |
|
Line 29: | Line 30: |
## PICTLIST.TXT | |
Line 36: | Line 38: |
## (for example, Block-01-01-TestDirSetUp-Orig) | ## (for example, Block-1A-TestDirSetUp-Orig) |
Line 39: | Line 41: |
testID=F3G-Nav blockID=Block-01-01-TestDirSetUp-Orig |
export testID=F3G-Nav export blockID=Block-1A-TestDirSetUp-Orig |
Line 45: | Line 47: |
# Display user inputs echo $testID echo $blockID |
|
Line 49: | Line 56: |
# sync to F3-base directory | ## ORIG # sync to F3-base/orig directory |
Line 51: | Line 59: |
rsync -ha ../F3-base/base/IMAGEFILES base/ | |
Line 53: | Line 60: |
## VARIANCE-F3G: rm orig/DATA ln -s ../ORex/DATA orig/DATA |
## VARIANCE: F3G - Organisation of lsupport directory and PICTLIST echo END > lsupport/PICTLIST_orig.TXT rm -r orig/lsupport ln -s ../lsupport/ orig/lsupport rm orig/PICTLIST.TXT ln -s lsupport/PICTLIST_orig.TXT orig/PICTLIST.TXT |
Line 58: | Line 68: |
# Print details | # print details |
Line 61: | Line 71: |
## base/IMAGEFILES # Link to App and PS Images contained in F3-base directory ls /SPC_Test/F3-base/base/IMAGEFILES/M59* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesF3base ls /SPC_Test/F3-base/base/IMAGEFILES/P59* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev >> lsupport/listImagesF3base while read line; do ln -s /SPC_Test/F3-base/base/IMAGEFILES/${line}.DAT base/IMAGEFILES/${line}.DAT done < lsupport/listImagesF3base cp /SPC_Test/F3-base/base/IMAGEFILES/README base/IMAGEFILES/ # print details |
|
Line 64: | Line 88: |
## Update orig/PICTLIST.TXT ls base/IMAGEFILES/M* | cut -d '/' -f 3 | cut -d '.' -f 1 > orig/PICTLIST.TXT ls base/IMAGEFILES/P* | cut -d '/' -f 3 | cut -d '.' -f 1 >> orig/PICTLIST.TXT sed -i -e 's/^/ /' orig/PICTLIST.TXT echo END >> orig/PICTLIST.TXT cat orig/PICTLIST.TXT ## base/SHAPEFILES # sync F3-base/base/SHAPEFILES directory rsync --delete -ha /SPC_Test/F3-base/base/SHAPEFILES/ base/SHAPEFILES/ # print details ls -l base/SHAPEFILES/ cat base/SHAPEFILES/README |
|
Line 65: | Line 103: |
date | |
Line 66: | Line 105: |
Line 70: | Line 110: |
# OPTION 1: OVERWRITE TYPESCRIPT LOG |
|
Line 71: | Line 113: |
# END OF OPTION 1 # OPTION 2: APPEND TYPESCRIPT LOG cat typescript >> /SPC_Test/$testID/log/log-typescript-${blockID} # END OF OPTION 2 |
Block-1A - TEST DIRECTORY SET-UP - ORIG
########################################################################## ## ## ## BLOCK 1A ## ## TEST DIRECTORY SET-UP - ORIG ## ## ## ########################################################################## ## This block populates an F3 test directory from the F3-base directory ## It clears and re-syncs the working directory (orig); adds links to ## App and PS images in the imagefiles directory (base/IMAGEFILES); ## and syncs the shapefiles directory (base/SHAPEFILES) ## in readiness for sensitivity testing ## Assumptions: ## User has invoked a Bourne-Again Shell (bash) on ormacsrv1.lpl.arizona.edu ## User is a member of the group OREX\spc ## User has set up a skeleton directory in the following format: ## /SPC_Test/F3G-Nav/ ## base/ ## IMAGEFILES/ ## SHAPEFILES/ ## lsupport/ ## PICTLIST.TXT ## orig/ ## results/ ## test/ ## User inputs: ## testID: Name of the F3 test directory (for example, F3E-Limbs) ## blockID: User-specified identifier for typescript textfile name ## (for example, Block-1A-TestDirSetUp-Orig) # User inputs: export testID=F3G-Nav export blockID=Block-1A-TestDirSetUp-Orig # Set-Up cd /SPC_Test/$testID script # Display user inputs echo $testID echo $blockID date pwd ls -l ## ORIG # sync to F3-base/orig directory rsync --delete -ha ../F3-base/orig . ## VARIANCE: F3G - Organisation of lsupport directory and PICTLIST echo END > lsupport/PICTLIST_orig.TXT rm -r orig/lsupport ln -s ../lsupport/ orig/lsupport rm orig/PICTLIST.TXT ln -s lsupport/PICTLIST_orig.TXT orig/PICTLIST.TXT ## END OF VARIANCE # print details ls -l orig cat orig/README ## base/IMAGEFILES # Link to App and PS Images contained in F3-base directory ls /SPC_Test/F3-base/base/IMAGEFILES/M59* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev > lsupport/listImagesF3base ls /SPC_Test/F3-base/base/IMAGEFILES/P59* | cut -d '.' -f 1 | rev | cut -d '/' -f 1 | rev >> lsupport/listImagesF3base while read line; do ln -s /SPC_Test/F3-base/base/IMAGEFILES/${line}.DAT base/IMAGEFILES/${line}.DAT done < lsupport/listImagesF3base cp /SPC_Test/F3-base/base/IMAGEFILES/README base/IMAGEFILES/ # print details ls -l base/IMAGEFILES cat base/IMAGEFILES/README ## Update orig/PICTLIST.TXT ls base/IMAGEFILES/M* | cut -d '/' -f 3 | cut -d '.' -f 1 > orig/PICTLIST.TXT ls base/IMAGEFILES/P* | cut -d '/' -f 3 | cut -d '.' -f 1 >> orig/PICTLIST.TXT sed -i -e 's/^/ /' orig/PICTLIST.TXT echo END >> orig/PICTLIST.TXT cat orig/PICTLIST.TXT ## base/SHAPEFILES # sync F3-base/base/SHAPEFILES directory rsync --delete -ha /SPC_Test/F3-base/base/SHAPEFILES/ base/SHAPEFILES/ # print details ls -l base/SHAPEFILES/ cat base/SHAPEFILES/README # Block Complete date exit # Save block log if [ ! -d /SPC_Test/$testID/log ]; then mkdir /SPC_Test/$testID/log fi # OPTION 1: OVERWRITE TYPESCRIPT LOG mv typescript /SPC_Test/$testID/log/log-typescript-${blockID} # END OF OPTION 1 # OPTION 2: APPEND TYPESCRIPT LOG cat typescript >> /SPC_Test/$testID/log/log-typescript-${blockID} # END OF OPTION 2