- Timestamp:
- 10/07/2009 23:40:21 (3 years ago)
- Location:
- branches/confman-1.9
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
confman.8.in (modified) (2 diffs)
-
confmanlib.sh.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/confman-1.9
-
branches/confman-1.9/confman.8.in
r455 r461 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" -
branches/confman-1.9/confmanlib.sh.in
r459 r461 544 544 local link=$2 545 545 local forced=$3 546 local opts isdir 547 local WD=`pwd` 546 local opts isdir linkdir rtarget rlink 548 547 549 548 if [ "$forced" == "true" ] ; then … … 554 553 fi 555 554 556 if [ -d "$link" ]; then 557 isdir="true" 558 if [[ "$link" =~ /$ ]]; then 559 link=${link%\/} 560 fi 561 fi 562 563 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") 564 564 target=`${readlink_cmd} -m $target` 565 target=${target/$ABS_WORK\//} 566 WD="${WD/$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 567 572 link=`${readlink_cmd} -m $link` 568 569 while [[ ${WD} =~ "^.+/" ]]; do 570 target="../$target" 571 WD=${WD#*/} 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%/*}/" 581 582 while [[ ${linkdir} =~ ^.+/ ]]; do 583 rtarget="../$rtarget" 584 linkdir=${linkdir#*/} 572 585 done 573 586 574 if [ -n "$isdir" ] ; then 575 link="${link}/${target/*\//}" 576 fi 577 578 ln -s $opts "$target" "$link" 579 @SVN@ add "$link" 587 ln -s $opts "$rtarget" "${WORK_PATH}/$rlink" 588 @SVN@ add "${WORK_PATH}/$rlink" 580 589 } 581 590
Note: See TracChangeset
for help on using the changeset viewer.
