From: Stephane Desneux Date: Mon, 8 Apr 2013 08:18:21 +0000 (+0200) Subject: yoctors: 'yed pkg run' works X-Git-Tag: rev_0.4~388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0aeaf32e2ef9b63a55c1347b9ae42a50a5eada4;p=scm%2Fbb%2Ftizen.git yoctors: 'yed pkg run' works --- diff --git a/yoctorc b/yoctorc index da30013..fd06bf2 100644 --- a/yoctorc +++ b/yoctorc @@ -68,18 +68,35 @@ function ycd () { pkg=$YOCTO_LAST_PKG fi if [[ -n "$pkg" ]]; then - cd $(ls -tr -d tmp*/work/*/$pkg 2>/dev/null | tail -1) || return 1 - - YOCTO_LAST_PKG=$pkg - subdir=${2:-src} + + case "$subdir" in + bb) + pkgdir=$(ls -tr -d ../meta-tizen-ivi/recipes-tizen/$pkg 2>/dev/null | tail -1) + ;; + *) + pkgdir=$(ls -tr -d tmp*/work/*/$pkg 2>/dev/null | tail -1) + ;; + esac + [[ -z "$pkgdir" ]] && { echo "Unable to find package dir" >&2; return 1; } + + cd $pkgdir case "$subdir" in temp|tmp) cd */temp || return 1 ;; src) cd git-*/git 2>/dev/null || cd */[0-9]* 2>/dev/null ;; *) ;; esac + + YOCTO_LAST_PKG=$pkg fi +} + +function ybb () { + ycheck || return 1 + pkg=${1:-$YOCTO_LAST_PKG} + [[ -z "pkg" ]] && { echo "Usage: ytmp " >&2; return 1; } + ycd $pkg bb } function ysrc () { @@ -138,7 +155,7 @@ function yed() { for tmpdir in $(ls -d */temp); do echo "tmpdir: $tmpdir" - files+=$(awk '{print "run." $1}' $tmpdir/log.task_order | tac | sed "s|^| $tmpdir/|g") + files+=$(ls $tmpdir/run*) files+=" $tmpdir" done fi