1 # shell aliases and functions for PLD Developer
4 # set $dist, used by functions below
5 [ -n "$dist" ] || dist=$(awk '{print tolower($NF)}' /etc/pld-release 2>/dev/null | tr -d '()')
9 alias $dist="poldek -q --sn $dist --cmd"
10 alias $dist-requires="$dist what-requires"
11 alias $dist-provides="$dist what-provides"
12 alias $dist-tag="./builder -cf -T $(echo $dist | tr '[a-z]' '[A-Z]')-branch -r HEAD"
13 alias $dist-verify=dist-verify
16 poldek --sn $dist --sn $dist-ready --up
17 poldek --sn $dist --sn $dist-ready --verify=deps "$@"
20 # displays latest used tag for a specfile
25 out=$(cvs status -v $s | awk "/auto-$dist-/{if (!a++) print \$1}")
32 alias cv='cvs status -v'
33 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"
34 alias pclean="sed -i~ -e '/^\(?\|=\+$\|unchanged:\|diff\|only\|Only\|Files\|Common\|Index:\|RCS file\|retrieving\)/d'"
36 # makes diff from PLD CVS urls
40 if [ -z "$url" ]; then
41 echo >&2 "Reading STDIN"
45 echo >&2 "Process $url"
48 file=${file#*SOURCES/}
57 echo >&2 "$file: $r1 -> $r2"
60 cvs diff -u -r$r1 -r$r2 $file | tee m.patch | diffcol
62 cvs diff -u -r$r1 -r$r2 $file
66 # makes diff from kde svn path
70 # --- branches/KDE/3.5/kdepim/kpilot/conduits/vcalconduit/vcalRecord.cc #624744:624745
72 echo >&2 "Process $url"
77 # http://websvn.kde.org/branches/KDE/3.5/kdepim/kpilot/conduits/vcalconduit/vcalRecord.cc?rev=624745&r1=612579&r2=624745&makepatch=1&diff_format=u
78 url=http://websvn.kde.org/${url% *}
79 url="$url?r1=$r1&r2=$r2&makepatch=1&diff_format=u"
82 wget "$url" -O -| tee m.patch | diffcol
89 # requires: patchutils
91 combinediff -p1 $1 $2 > m.patch || return
96 # downloads sourceforge url from specific mirror
99 url="${url%?download}"
100 url="http://dl.${url#http://prdownloads.}"
102 local mirror="http://nchc.dl.sourceforge.net"
103 url="$mirror/sourceforge/${url#http://dl.sourceforge.net/}"
109 diff -ur "$@" | diffcol | less -R
117 s,
\e,
\e[44m^[
\e[49m,g;
118 s,
\a,
\e[44m^G
\e[49m,g;
119 s,^\(Index:\|diff\|---\|+++\) .*$,
\e[32m&,;
123 s,
\r,
\e[44m^M
\e[49m,g;
125 s,\([^[:space:]]\)\([[:space:]]\+\)$,\1
\e[41m\2
\e[49m,g;
130 # chdir to file location and do 'cvs log'
134 [ "$d" = "$f" ] && d=.
135 (builtin cd $d && cvs log ${f##*/})