Ignore:
Timestamp:
12/04/2006 16:38:25 (5 years ago)
Author:
ccowart
Message:

Created the attributes features for storing arbitrary metadata associated
with files. These attributes will be the framework for syntax verification
and {pre,post}-install scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman/confmanlib.sh

    r121 r122  
    441441# Accepts log messages on stdin until EOF 
    442442function conf_logger { 
    443    cat | logger -t "$MYNAME[$$]: $USER" -s 
     443   logger -t "$MYNAME[$$]: $USER" -s 2>&4 
     444} 
     445 
     446function conf_chattr { 
     447    local attr="confman:$1" 
     448    shift 
     449    local value="$1" 
     450    shift 
     451    svn propset "$attr" "$value" "$@" 
     452} 
     453 
     454function 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 
     466function conf_rmattr { 
     467    local attr="confman:$1" 
     468    shift 
     469    svn propdel "$attr" "$@" 
    444470} 
    445471 
     
    449475# process, which is receiving its input from our fd 2. 
    450476function conf_cleanexit { 
    451     echo "Confman received a signal. Exiting cleanly." | conf_logger 
     477    echo "Received a signal. Exiting cleanly." | conf_logger 
    452478        echo "Abort, Abort! Patience is a virtue." >&4 
    453479        echo "Please wait until I finish cleaning up after you." >&4 
Note: See TracChangeset for help on using the changeset viewer.