]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- extracted from my ~/.bashrc
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 27 Sep 2006 21:01:20 +0000 (21:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-build.sh -> 1.1

rpm-build.sh [new file with mode: 0644]

diff --git a/rpm-build.sh b/rpm-build.sh
new file mode 100644 (file)
index 0000000..6c16579
--- /dev/null
@@ -0,0 +1,62 @@
+# shell aliases and functions for PLD Developer
+
+# find *.rej files
+alias cv='cvs status -v'
+alias ac='poldek -q --sn ac --cmd'
+alias ac-requires='ac what-requires'
+alias ac-provides='ac what-provides'
+alias ac-tag='./builder -cf -T AC-branch -r HEAD'
+alias ac-get='./builder -r AC-branch -g'
+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"
+alias pclean="sed -i~ -e '/^\(?\|=\+$\|unchanged:\|diff\|only\|Only\|Files\|Common\|Index:\|RCS file\|retrieving\)/d'"
+
+# merges two patches
+# requires: patchutils
+pmerge() {
+       combinediff -p1 $1 $2 > m.patch || return
+       pclean m.patch
+       dif $1 m.patch
+}
+
+# makes diff from PLD CVS urls
+urldiff() {
+       local url="$1"
+       if [ -z "$url" ]; then
+               echo >&2 "Reading STDIN"
+               read url
+       fi
+
+       echo >&2 "Process $url"
+       local file="$url"
+       file=${file#*SPECS/}
+       file=${file#*SOURCES/}
+       file=${file##*/}
+       local r1=${file#*r1=}
+       local r2=${r1#*r2=}
+       r2=${r2%&*}
+       r1=${r1%%&*}
+       file=${file%\?*}
+
+       echo >&2 "$file: $r1 -> $r2"
+       cvs diff -u -r$r1 -r$r2 $file | tee m.patch | diffcol
+}
+
+# downloads sourceforge url from specific mirror
+sfget() {
+       local url="$1"
+       url="${url%?download}"
+       url="http://dl.${url#http://prdownloads.}"
+       # use mirror
+       local mirror="http://nchc.dl.sourceforge.net"
+       url="$mirror/sourceforge/${url#http://dl.sourceforge.net/}"
+       wget -c "$url"
+}
+
+# displays latest used tag for a specfile
+autotag() {
+       local out
+       for a in "$@"; do
+               out=$(cvs status -v $a | awk '/auto-ac-/{if (!a++) print $1}')
+               echo "$a:$out"
+       done
+}
This page took 0.041732 seconds and 4 git commands to generate.