tModified/Fixed cpu, menu and prtup - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 40bb8a0c67754d56fae74c5cd642f82af54eb97a
 (DIR) parent 0fde3c1375342d76ee5db0225c0a4d0e22a25c12
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Fri,  9 Jan 2015 18:40:57 +0100
       
       Modified/Fixed cpu, menu and prtup
       
       Diffstat:
         M cpu                                 |       2 +-
         M menu                                |       4 ++--
         M prtup                               |      15 ++++++++++-----
       
       3 files changed, 13 insertions(+), 8 deletions(-)
       ---
 (DIR) diff --git a/cpu b/cpu
       t@@ -12,7 +12,7 @@ EOF
        }
        
        cpuperc () {
       -    LINE=`ps -eo pcpu |grep -vE '^\s*(0.0|%CPU)' |sed -n '1h;$!H;$g;s/\n/ +/gp'`
       +    LINE=`ps -eo pcpu |grep -vE '^\s*(0.0|%CPU)' |tr '\n' '+'|sed 's/+$//'`
        
            echo "`echo $LINE | bc`%"
        }
 (DIR) diff --git a/menu b/menu
       t@@ -1,7 +1,7 @@
        #!/bin/bash
       -thingmenu -g 120x120 \
       +thingmenu -g 120x140 \
            "play a game"       "steam" \
            "frag people"       "ioquake3" \
       -    "pop a term"        "urxvt" \
       +    "chat on irc"       "urxvt -e sh -c 'dm irc ssh blink'" \
            "surf the web"      "dwb" \
            "want some more?"   "thinglaunch" 2> /dev/null
 (DIR) diff --git a/prtup b/prtup
       t@@ -27,16 +27,21 @@ get_version() {
            cd $PKGMK_SOURCE_DIR
        
            # enter the git directory
       -    if cd $name; then
       +    if cd $name 2>/dev/null; then
                git pull origin master
        
       -        # get the git hash and its minimized version
       -        version=$(git log --oneline --format="git-%h" | sed 1q)
       -        sversion=$(git log --oneline --format="%H" | sed 1q)
       +    elif test -n "$gitsource"; then
       +        git clone $gitsource $name
       +        cd $name
       +
            else
       -        echo_color 1 'Cannot check git sources'
       +        echo_color 1 "not a git-based port"
                exit 1
            fi
       +
       +    # get the git hash and its minimized version
       +    version=$(git log --oneline --format="git-%h" | sed 1q)
       +    sversion=$(git log --oneline --format="%H" | sed 1q)
        }
        
        update_pkgfile() {