]> git.wh0rd.org Git - home.git/commitdiff
make pretend output easier to copy & paste
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jun 2012 05:42:01 +0000 (01:42 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 9 Jun 2012 05:42:01 +0000 (01:42 -0400)
.bin/cros-board

index 7bede6919b21b8ce2062f66c52b645589c720c40..c53b04ecdad3dce7673c2dee087d78434933c7d4 100755 (executable)
@@ -34,8 +34,8 @@ done
 piperet() { set -- ${PIPESTATUS[@]/0}; [[ $# -eq 0 ]]; }
 run() {
        set +e
-       ebegin "$*"
        if ! ${ARG_PRETEND} ; then
+               ebegin "$*"
                local log="${IMAGES}"/log.${1##*/}
                if ${ARG_VERBOSE} ; then
                        "$@" |& tee "${log}"
@@ -43,8 +43,10 @@ run() {
                        "$@" >& "${log}"
                fi
                piperet
+               eend $? || exit $?
+       else
+               einfo "$*"
        fi
-       eend $? || exit $?
        set -e
 }