Changeset 495
- Timestamp:
- 11/12/2009 11:06:23 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
confman.in (modified) (2 diffs)
-
confmanlib.sh.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman.in
r492 r495 254 254 function inst { 255 255 local file livefile 256 local msg status files file sing256 local msg status files args 257 257 local nocommit=true 258 258 local system_lock wcopy_lock 259 259 local opt OPTIND OPTARG 260 local module 260 261 261 262 while getopts ":m:F:" opt ; do … … 290 291 291 292 for layer in $(conf_get_recipe) ; do 292 conf_install $layer "$@" 293 # Fix singularities in the file arguments 294 args= 295 for file in "$@"; do 296 module=$(conf_wfile_module $file) 297 if conf_wfile_is_singularity $file; then 298 args="${args:+${args} }${file%-$module}-${layer}" 299 else 300 args="${args:+${args} }${file}" 301 fi 302 done 303 304 conf_install $layer "$args" 293 305 done 294 306 for file in $SINGULARITIES ; do -
trunk/confmanlib.sh.in
r492 r495 455 455 } 456 456 457 # Takes a working copy file path and returns the corresponding live file path 457 458 function conf_livefile { 458 459 local file="$1" 459 460 local path=$(conf_rel_path "$file") || return 460 echo ${path#*/}/ 461 } 462 461 echo /${path#*/} 462 } 463 464 # Takes a working copy file path and returns whether it is a singularity 463 465 function conf_wfile_is_singularity { 466 local file=$(${readlink_cmd} -m "$1") 467 local module=$(conf_wfile_module $file) 468 local livefile=$(conf_livefile $file) 469 local sing 470 for sing in $SINGULARITIES ; do 471 if [ "$sing" = ${livefile%-$module} ] ; then 472 return 0 473 fi 474 done 475 return 1 476 } 477 478 # Takes a working copy file path and returns the associated module 479 function conf_wfile_module { 464 480 local file=$(${readlink_cmd} -m "$1") 465 481 ABS_WORK=$(${readlink_cmd} -m "$WORK_PATH") 466 482 local module=${file#${ABS_WORK}/} 467 483 module=${module%%/*} 468 local livefile=$(conf_livefile $file) 469 local sing 470 for sing in $SINGULARITIES ; do 471 if [ "$sing" = "${livefile%-$module}" ] ; then 472 return 0 473 fi 474 done 475 return 1 484 echo "$module" 476 485 } 477 486
Note: See TracChangeset
for help on using the changeset viewer.
