Changeset 122
- Timestamp:
- 12/04/2006 16:38:25 (5 years ago)
- Location:
- trunk/confman
- Files:
-
- 4 edited
-
confman (modified) (2 diffs)
-
confmancommon.sh (modified) (1 diff)
-
confmandoc.sh (modified) (2 diffs)
-
confmanlib.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman/confman
r120 r122 552 552 } 553 553 554 function lsattr { 555 if [ -z "$1" ] ; then 556 conf_lsattr * 557 else 558 conf_lsattr "$@" 559 fi 560 } 561 562 function chattr { 563 local attr="$1" 564 shift 565 local value="${1:-true}" 566 shift 567 if [ -z "$1" ] ; then print_usage 1 ; fi 568 569 conf_chattr "$attr" "$value" "$@" 570 } 571 572 function rmattr { 573 local attr="$1" 574 shift 575 if [ -z "$1" ] ; then print_usage 1 ; fi 576 577 conf_rmattr "$attr" "$@" 578 } 579 554 580 # Dubug mode? 555 581 while getopts "d" opt ; do … … 570 596 shift 571 597 case $subcommand in 572 help ) print_help $* ; exit 0 ;; 573 setup|se* ) setup $* ;; 574 status|st* ) status $* ;; 575 create|cr* ) create $* ;; 576 update|u* ) update $* ;; 577 commit|com* ) commit $* ;; 578 import|im* ) import $* ;; 579 install|in* ) inst $* ;; 580 remove|rem*|rm ) remove $* ;; 581 rev* ) revert $* ;; 582 ren* ) rename $* ;; 583 rmmod ) rmmod $* ;; 584 mkdir|mkd* ) newdir $* ;; 585 list|ls ) list $* ;; 586 move|mv ) move $* ;; 587 copy|cp ) copy $* ;; 588 diff ) diff $* ;; 589 log ) log $* ;; 590 chmod ) chmode $* ;; 591 chown ) chowner $* ;; 592 chcom ) chcom $* ;; 593 chgrp ) chgroup $* ;; 594 checklook|checklist|chls|chlk ) checklook $* ;; 595 checknew|chnw ) checknew $* ;; 596 checkclear|chcl|chrm ) checkclear $* ;; 597 rollback|ro* ) rollback $* ;; 598 * ) print_usage 1 ;; 598 help ) print_help "$@" ; exit 0 ;; 599 setup|se* ) setup "$@" ;; 600 status|st* ) status "$@" ;; 601 create|cr* ) create "$@" ;; 602 update|u* ) update "$@" ;; 603 commit|com* ) commit "$@" ;; 604 import|im* ) import "$@" ;; 605 install|in* ) inst "$@" ;; 606 remove|rem*|rm ) remove "$@" ;; 607 rev* ) revert "$@" ;; 608 ren* ) rename "$@" ;; 609 rmmod ) rmmod "$@" ;; 610 mkdir|mkd* ) newdir "$@" ;; 611 list|ls ) list "$@" ;; 612 lsattr ) lsattr "$@" ;; 613 chattr ) chattr "$@" ;; 614 rmattr ) rmattr "$@" ;; 615 move|mv ) move "$@" ;; 616 copy|cp ) copy "$@" ;; 617 diff ) diff "$@" ;; 618 log ) log "$@" ;; 619 chmod ) chmode "$@" ;; 620 chown ) chowner "$@" ;; 621 chcom ) chcom "$@" ;; 622 chgrp ) chgroup "$@" ;; 623 checklook|checklist|chls|chlk ) checklook "$@" ;; 624 checknew|chnw ) checknew "$@" ;; 625 checkclear|chcl|chrm ) checkclear "$@" ;; 626 rollback|ro* ) rollback "$@" ;; 627 * ) print_usage 1 ;; 599 628 esac 600 629 601 # We shouldn't be here. 602 exit 1 630 exit 603 631 604 632 # vim:ts=4 -
trunk/confman/confmancommon.sh
r121 r122 23 23 else 24 24 exec 3>&1 25 exec $0 $*5>&1 1>&3 | logger -t "$MYNAME[$$]: $USER" -s25 exec $0 "$@" 5>&1 1>&3 | logger -t "$MYNAME[$$]: $USER" -s 26 26 exit ${PIPESTATUS[0]} 27 27 fi -
trunk/confman/confmandoc.sh
r121 r122 29 29 $MYNAME install workingfile [ workingfile ... ] 30 30 $MYNAME ls [ workingfile | workingdirectory ] 31 $MYNAME lsattr [ workingfile | workingdirectory ] 32 $MYNAME chattr attribute value [ workingfile | workingdirectory ] 33 $MYNAME rmattr attribute [ workingfile | workingdirectory ] 31 34 $MYNAME rm workingfile 32 35 $MYNAME cp src_working_copy dest_working_copy … … 278 281 EOF 279 282 ;; 283 lsattr ) 284 cat<<EOF 285 $MYNAME provides a command-line interface to Rescomp's server configuration 286 management system. 287 288 Usage: 289 $MYNAME lsattr [ file | directory ] 290 291 The lsattr subcommand lists out the confman attributes of files in the 292 repository. These attributes can be used to store information such as 293 file permissions, ownership, comment characters, syntax checkers, and 294 even commands to execute when changing the file. 295 296 EOF 297 ;; 298 chattr ) 299 cat<<EOF 300 $MYNAME provides a command-line interface to Rescomp's server configuration 301 management system. 302 303 Usage: 304 $MYNAME chattr attribute value [ file | directory ] 305 306 The chattr subcommand alters the confman attributes of files in the 307 repository. These attributes can be used to store information such as 308 file permissions, ownership, comment characters, syntax checkers, and 309 even commands to execute when changing the file. 310 311 EOF 312 ;; 313 rmattr ) 314 cat<<EOF 315 $MYNAME provides a command-line interface to Rescomp's server configuration 316 management system. 317 318 Usage: 319 $MYNAME rmattr attribute [ file | directory ] 320 321 The rmattr subcommand removes the confman attributes of files in the 322 repository. These attributes can be used to store information such as 323 file permissions, ownership, comment characters, syntax checkers, and 324 even commands to execute when changing the file. 325 326 EOF 327 ;; 280 328 cho* ) 281 329 cat <<EOF -
trunk/confman/confmanlib.sh
r121 r122 441 441 # Accepts log messages on stdin until EOF 442 442 function conf_logger { 443 cat | logger -t "$MYNAME[$$]: $USER" -s 443 logger -t "$MYNAME[$$]: $USER" -s 2>&4 444 } 445 446 function conf_chattr { 447 local attr="confman:$1" 448 shift 449 local value="$1" 450 shift 451 svn propset "$attr" "$value" "$@" 452 } 453 454 function conf_lsattr { 455 local file="$1" 456 shift 457 echo "$file" 458 for prop in $(svn proplist $file | grep 'confman:' | sort) ; do 459 echo -e "\t${prop#confman:}\t" $(svn propget $prop $file) 460 done 461 if [ -n "$1" ] ; then 462 conf_lsattr "$@" 463 fi 464 } 465 466 function conf_rmattr { 467 local attr="confman:$1" 468 shift 469 svn propdel "$attr" "$@" 444 470 } 445 471 … … 449 475 # process, which is receiving its input from our fd 2. 450 476 function conf_cleanexit { 451 echo " Confman received a signal. Exiting cleanly." | conf_logger477 echo "Received a signal. Exiting cleanly." | conf_logger 452 478 echo "Abort, Abort! Patience is a virtue." >&4 453 479 echo "Please wait until I finish cleaning up after you." >&4
Note: See TracChangeset
for help on using the changeset viewer.
