- Timestamp:
- 10/07/2009 23:38:04 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
confman.8.in (modified) (2 diffs)
-
confmanlib.sh.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman.8.in
r453 r460 244 244 .Ar destination . 245 245 Arguments must be working copies. 246 .It Cm link [ Fl f ] Ar target link_name 247 The link command creates a symbolic link (See 248 .Xr ln 1) pointing to the 249 .Ar target 250 file or directory. If 251 .Ar link_name 252 is a 253 directory, the link will be created with the same 254 .Xr basename 1 as 255 .Ar target . 256 The most common use of repository symlinks is to reconcile path differences 257 between operatings systems. You can create freebsd/usr/local/etc/sudoers as 258 a normal file. You can then create the link linux/etc/sudoers to point 259 to the former file (in the freebsd module). This allows you to have a 260 single copy of the file in different locations for different modules. 246 261 .It Cm mkdir Ar directory 247 262 Create a new version-controlled directory in your working copy. Parent … … 362 377 .Pp 363 378 And our host-specific configurations in the marvin portion 364 ( www/etc/rc.conf-marvin):379 (marvin/etc/rc.conf-marvin): 365 380 .Pp 366 381 .Dl apache22_enable="YES" -
trunk/confmanlib.sh.in
r454 r460 544 544 local link=$2 545 545 local forced=$3 546 local opts isdir linkdir 546 local opts isdir linkdir rtarget rlink 547 547 548 548 if [ "$forced" == "true" ] ; then … … 553 553 fi 554 554 555 if [ -d "$link" ]; then 556 isdir="true" 557 if [[ "$link" =~ /$ ]]; then 558 link=${link%\/} 559 fi 560 fi 561 562 ABS_WORK=`${readlink_cmd} -m $WORK_PATH` 555 if [ -d "$link" ] ; then 556 link="${link}/$(basename "${target}")" 557 fi 558 559 # target needs to be transformed to be relative to the link. In order 560 # to do this, we need to cannonicalize filenames relative to the 561 # working copy root 562 563 ABS_WORK=$(${readlink_cmd} -m "$WORK_PATH") 563 564 target=`${readlink_cmd} -m $target` 564 target=${target/$ABS_WORK\//} 565 rtarget=${target#${ABS_WORK}/} 566 567 if [ "$target" = "$rtarget" ] ; then 568 echo "target $target does not appear to be in your working copy." >&4 569 return 1 570 fi 571 565 572 link=`${readlink_cmd} -m $link` 566 linkdir="${link/$ABS_WORK\//}/" 573 rlink="${link#${ABS_WORK}/}" 574 575 if [ "$link" = "$rlink" ] ; then 576 echo "link $link does not appear to be in your working copy." >&4 577 return 1 578 fi 579 580 linkdir="${rlink%/*}/" 567 581 568 582 while [[ ${linkdir} =~ ^.+/ ]]; do 569 target="../$target"583 rtarget="../$rtarget" 570 584 linkdir=${linkdir#*/} 571 585 done 572 586 573 if [ -n "$isdir" ] ; then 574 link="${link}/${target/*\//}" 575 fi 576 577 ln -s $opts "$target" "$link" 578 @SVN@ add "$link" 587 ln -s $opts "$rtarget" "${WORK_PATH}/$rlink" 588 @SVN@ add "${WORK_PATH}/$rlink" 579 589 } 580 590
Note: See TracChangeset
for help on using the changeset viewer.
