SOURCES: rpm-build.sh (NEW) - extracted from my ~/.bashrc
glen
glen at pld-linux.org
Wed Sep 27 23:01:25 CEST 2006
Author: glen Date: Wed Sep 27 21:01:25 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- extracted from my ~/.bashrc
---- Files affected:
SOURCES:
rpm-build.sh (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/rpm-build.sh
diff -u /dev/null SOURCES/rpm-build.sh:1.1
--- /dev/null Wed Sep 27 23:01:25 2006
+++ SOURCES/rpm-build.sh Wed Sep 27 23:01:20 2006
@@ -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
+}
================================================================
More information about the pld-cvs-commit
mailing list