|
@@ -2,24 +2,34 @@
|
|
|
# Debian stuff
|
|
|
|
|
|
# specific aliases
|
|
|
-alias lintian="lintian --color=auto -IEm"
|
|
|
+alias lintian="lintian --color=auto -IEm --pedantic"
|
|
|
|
|
|
# building environements
|
|
|
cow-dist () {
|
|
|
- [ $# -lt 2 ] \
|
|
|
- && echo "Error args." \
|
|
|
- && return
|
|
|
-
|
|
|
- dist=$1
|
|
|
- shift
|
|
|
- command=$1
|
|
|
- shift
|
|
|
-
|
|
|
- cowbuilder $command --configfile ~/.cowbuilder/$dist $@
|
|
|
+ if [ $# -lt 2 ]; then
|
|
|
+ echo "Error args."
|
|
|
+ return
|
|
|
+ fi
|
|
|
+ DIST=$1
|
|
|
+ shift
|
|
|
+ OPTS=
|
|
|
+ if [ "$1" = "--update" ]; then
|
|
|
+ OPTS="--no-cowdancer-update"
|
|
|
+ elif [ "$1" = "--build" -a -z "$2" ]; then
|
|
|
+ if [ -f debian/changelog ]; then
|
|
|
+ dsc=$(egrep -v "^([[:space:]]+|$)" debian/changelog| \
|
|
|
+ sed 's/\([^ ]*\) (\([^)]*\)).*/..\/\1_\2.dsc/'|head -1)
|
|
|
+ if [ -f "$dsc" ]; then
|
|
|
+ OPTS="$dsc"
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ sudo DIST=$DIST cowbuilder $@ $OPTS
|
|
|
return $?
|
|
|
}
|
|
|
|
|
|
alias cow-stable="cow-dist stable"
|
|
|
+alias cow-stable-bpo="cow-dist stable-bpo"
|
|
|
alias cow-sid="cow-dist sid"
|
|
|
|
|
|
# tools
|
|
@@ -33,12 +43,12 @@ pdebdiff() {
|
|
|
exit
|
|
|
fi
|
|
|
|
|
|
- egrep -v "^([[:space:]]+|$)" debian/changelog | \
|
|
|
+ egrep -v "^([[:space:]]+|$)" debian/changelog | \
|
|
|
sed 's/[^ ]* (\([^)]*\)).*/\1/' | \
|
|
|
head -n2|tr '\n' $IFS | \
|
|
|
read v1 v2
|
|
|
|
|
|
- if [ -z "$v1" -o -z "$v2" ]; then
|
|
|
+ if [ -z "$v1" -o -z "$v2" ]; then
|
|
|
echo "ERR: can't find version \$n and \$n-1 of the package";
|
|
|
exit
|
|
|
fi
|