X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.bashrc;h=75afd7846dc3b135d847a93f1111ea75ac534eec;hp=7de8245c50268dd67c5c23dc38cc491bfeb68781;hb=c8465fda852554c3cb9ae0cecf158a302f412265;hpb=ea81e48cea04450781cdf782b4e0702c4dfc5b01 diff --git a/.bashrc b/.bashrc index 7de8245..75afd78 100644 --- a/.bashrc +++ b/.bashrc @@ -349,7 +349,12 @@ function gdbf12cvscheckout {(set -ex );} function uri_escape { perl -MURI::Escape -le '$_=<>;chomp;print uri_escape $_;'; }; function uri_unescape { perl -MURI::Escape -le '$_=<>;chomp;print uri_unescape $_;'; }; -function n { if [ "$1" = "-p" ];then renice +19 "$@";ionice -c3 "$@";else nice -n19 ionice -c3 "$@";fi }; +if which ionice &>/dev/null;then + IONICE="ionice -c3" +else + IONICE="" +fi +function n { if [ "$1" = "-p" ];then renice +19 "$@";test -n "$IONICE" && $IONICE "$@";else nice -n19 $IONICE "$@";fi }; function rpmsrclist { if [ -z "$*" ]; then