1 # shell aliases and functions for PLD Developer
4 alias cv='cvs status -v'
5 alias ac='poldek -q --sn ac --cmd'
6 alias ac-requires='ac what-requires'
7 alias ac-provides='ac what-provides'
8 alias ac-verify='poldek --sn ac --sn ac-ready --verify=deps'
9 alias ac-tag='./builder -cf -T AC-branch -r HEAD'
10 alias adif="dif -x '*.m4' -x ltmain.sh -x install-sh -x depcomp -x 'Makefile.in' -x compile -x 'config.*' -x configure -x missing -x mkinstalldirs -x autom4te.cache"
11 alias pclean="sed -i~ -e '/^\(?\|=\+$\|unchanged:\|diff\|only\|Only\|Files\|Common\|Index:\|RCS file\|retrieving\)/d'"
14 # requires: patchutils
16 combinediff -p1 $1 $2 > m.patch || return
21 # makes diff from PLD CVS urls
24 if [ -z "$url" ]; then
25 echo >&2 "Reading STDIN"
29 echo >&2 "Process $url"
32 file=${file#*SOURCES/}
41 echo >&2 "$file: $r1 -> $r2"
44 pipe=' | tee m.patch | diffcol'
46 cvs diff -u -r$r1 -r$r2 $file $pipe
49 # downloads sourceforge url from specific mirror
52 url="${url%?download}"
53 url="http://dl.${url#http://prdownloads.}"
55 local mirror="http://nchc.dl.sourceforge.net"
56 url="$mirror/sourceforge/${url#http://dl.sourceforge.net/}"
60 # displays latest used tag for a specfile
64 out=$(cvs status -v $a | awk '/auto-ac-/{if (!a++) print $1}')
71 diff -ur "$@" | diffcol | less -R
79 s,
\e,
\e[44m^[
\e[49m,g;
80 s,
\a,
\e[44m^G
\e[49m,g;
81 s,^\(Index:\|diff\|---\|+++\) .*$,
\e[32m&,;
85 s,
\r,
\e[44m^M
\e[49m,g;
87 s,\([^[:space:]]\)\([[:space:]]\+\)$,\1
\e[41m\2
\e[49m,g;
92 # chdir to file location and do 'cvs log'
96 [ "$d" = "$f" ] && d=.
97 (builtin cd $d && cvs log ${f##*/})