diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2010-04-02 22:03:02 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:20 -0600 |
commit | 67952443f7a7e3a76c9755c3e0f04789ae7705d1 (patch) | |
tree | 00bea57bdf74b20c9336b565880a2def6c321a00 /rvs/plugins/tree/bin/addparent.sh | |
parent | 0f7db62d9229aeaf87ab13fb010be797b375ff5a (diff) |
well, rvs trees at least sorta work now
Diffstat (limited to 'rvs/plugins/tree/bin/addparent.sh')
-rw-r--r-- | rvs/plugins/tree/bin/addparent.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/rvs/plugins/tree/bin/addparent.sh b/rvs/plugins/tree/bin/addparent.sh index af60e5a..6759bcb 100644 --- a/rvs/plugins/tree/bin/addparent.sh +++ b/rvs/plugins/tree/bin/addparent.sh @@ -21,12 +21,15 @@ usage="usage: $RVS $name CHILD PARENT" child=${1?"$usage"} parent=${2?"$usage"} -ct="`"$RVS" blob-gettype "$child"`" -pt="`"$RVS" blob-gettype "$parent"`" - -if [ "$ct" = "$pt" ]; then - "$RVS" "addparent.$ct" "$child" "$parent" -else - error "CHILD and PARENT must be type of the same type" +if [ ! "$child" = "$parent" ]; then + ct="`"$RVS" blob-gettype "$child"`" + pt="`"$RVS" blob-gettype "$parent"`" + + if [ "$ct" = "$pt" ]; then + "$RVS" "addparent.$ct" "$child" "$parent" + else + echo "$0: CHILD and PARENT must be the same type">>/dev/stderr + exit 1 + fi fi |