Update of /cvsroot/leaf/devel/ccarr/devel/leaf-tools
In directory sc8-pr-cvs1:/tmp/cvs-serv20532

Modified Files:
        cdb test-cdb.sh 
Log Message:
Minor quoting cleanup


Index: cdb
===================================================================
RCS file: /cvsroot/leaf/devel/ccarr/devel/leaf-tools/cdb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cdb 17 Feb 2003 07:30:28 -0000      1.4
--- cdb 19 Feb 2003 15:28:16 -0000      1.5
***************
*** 24,33 ****
        then
                dir="$2"
!               is_valid "$dir" || { perror $TREE "$dir: invalid dir"; exit 1; }
                cd "$dir" || { exit 1; }
                shift 2
  
                # assume if they provided no args they mean the whole tree
!               if test $# -eq 0
                then
                        get_tree *
--- 24,34 ----
        then
                dir="$2"
!               is_valid "$dir" || \
!                               { perror $TREE "$dir: invalid dir"; exit 1; }
                cd "$dir" || { exit 1; }
                shift 2
  
                # assume if they provided no args they mean the whole tree
!               if test "$#" -eq 0
                then
                        get_tree *
***************
*** 39,48 ****
                if is_valid "$arg"
                then
!                       if test -d $arg
                        then
!                               get_tree $arg
!                       elif test -f $arg
                        then
!                               get_leaf $arg
                        else
                                perror $GET "$arg: no such key or tree"
--- 40,49 ----
                if is_valid "$arg"
                then
!                       if test -d "$arg"
                        then
!                               get_tree "$arg"
!                       elif test -f "$arg"
                        then
!                               get_leaf "$arg"
                        else
                                perror $GET "$arg: no such key or tree"
***************
*** 87,91 ****
        then
                dir="$2"
!               is_valid "$dir" || { perror $TREE "$dir: invalid dir"; exit 1; }
                mkdir -p "$dir" || { exit 1; }
                cd "$dir" || { exit 1; }
--- 88,93 ----
        then
                dir="$2"
!               is_valid "$dir" || \
!                               { perror $TREE "$dir: invalid dir"; exit 1; }
                mkdir -p "$dir" || { exit 1; }
                cd "$dir" || { exit 1; }
***************
*** 164,171 ****
  {
        # process args as pairs
!       while test $# -gt 0
        do
!               file="$1"; contents="$2"
!               is_valid "$file" || { perror $SET "$file: invalid key"; exit 1; }
                shift 2 || { perror $SET "$file: unpaired key"; exit 1; }
                mkdir -p `dirname "$file"` || { exit 1; }
--- 166,174 ----
  {
        # process args as pairs
!       while test "$#" -gt 0
        do
!               file="$1" contents="$2"
!               is_valid "$file" || \
!                               { perror $SET "$file: invalid key"; exit 1; }
                shift 2 || { perror $SET "$file: unpaired key"; exit 1; }
                mkdir -p `dirname "$file"` || { exit 1; }
***************
*** 186,192 ****
        while read file contents
        do
!               file=`echo $file | tr '_' '/'`
                contents=`shunescape "$contents"`
!               is_valid "$file" || { perror $SET "$file: invalid key"; exit 1; }
                mkdir -p `dirname "$file"` || { exit 1; }
                echo -n "$contents" > "$file"
--- 189,196 ----
        while read file contents
        do
!               file=`echo "$file" | tr '_' '/'`
                contents=`shunescape "$contents"`
!               is_valid "$file" || \
!                               { perror $SET "$file: invalid key"; exit 1; }
                mkdir -p `dirname "$file"` || { exit 1; }
                echo -n "$contents" > "$file"
***************
*** 208,215 ****
  
                # assume if they provided no args they mean the whole tree
!               if test $# -eq 0
                then
                        cd ..
!                       del_tree $dir
                fi
        fi
--- 212,219 ----
  
                # assume if they provided no args they mean the whole tree
!               if test "$#" -eq 0
                then
                        cd ..
!                       del_tree "$dir"
                fi
        fi
***************
*** 219,228 ****
                if is_valid "$arg"
                then
!                       if test -d $arg
                        then
!                               del_tree $arg
!                       elif test -f $arg
                        then
!                               del_leaf $arg
                        else
                                perror $DEL "$arg: no such file or directory"
--- 223,232 ----
                if is_valid "$arg"
                then
!                       if test -d "$arg"
                        then
!                               del_tree "$arg"
!                       elif test -f "$arg"
                        then
!                               del_leaf "$arg"
                        else
                                perror $DEL "$arg: no such file or directory"
***************
*** 277,281 ****
  shunescape ()
  {
!       echo $1 | sed "s/^'\(.*\)'$/\1/g"
  }
  
--- 281,285 ----
  shunescape ()
  {
!       echo "$1" | sed "s/^'\(.*\)'$/\1/g"
  }
  
***************
*** 294,298 ****
  # main arg dispatcher
  #
! if test $# -ge 2
  then
        # all initial ops are relative to the root
--- 298,302 ----
  # main arg dispatcher
  #
! if test "$#" -ge 2
  then
        # all initial ops are relative to the root

Index: test-cdb.sh
===================================================================
RCS file: /cvsroot/leaf/devel/ccarr/devel/leaf-tools/test-cdb.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test-cdb.sh 18 Feb 2003 06:27:37 -0000      1.2
--- test-cdb.sh 19 Feb 2003 15:28:16 -0000      1.3
***************
*** 96,99 ****
--- 96,100 ----
  cdb del array1
  cdb del tree dir1 array2
+ cdb del dir1 dir2/dir3 dir2
  
  output=`cdb get name1 name2 dir1/name3 dir2/name4 dir2/name5 dir2/dir3/name6 array1 
dir1/array2 2> /dev/null`




-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Leaf-cvs-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to