]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - shrc.sh
do not remove macros.build from macrofiles for parsing spec
[packages/rpm-build-tools.git] / shrc.sh
diff --git a/shrc.sh b/shrc.sh
index 04da3c57f54fd6f6c5ed2f3af8718a3eb9067f47..8e3698402618e0238fa7eba0fca2d14320fc6c37 100755 (executable)
--- a/shrc.sh
+++ b/shrc.sh
@@ -24,15 +24,20 @@ ac-tag() {
        # see if remote has branch present
        local branch=AC-branch
        if git show-ref -q refs/remotes/origin/$branch; then
-               if [ -z "$(git tag --points-at $branch 2>/dev/null)" ]; then
+               git fetch --tags
+               if [ -z "$(git tag --points-at origin/$branch 2>/dev/null)" ]; then
                        echo >&2 "There's no tag pointing to current $branch; refusing to delete branch"
                        return 1
                fi
+               # delete local branch if exists
+               git show-ref -q refs/heads/$branch && git branch -d $branch
+
+               # drop remote branch
                git push --delete origin $branch
        fi
 
        git tag -f $branch
-       git push origin $branch
+       git push -f origin $branch
 }
 
 # undo spec utf8
@@ -186,9 +191,8 @@ get-buildlog() {
 
 fi # no $dist set
 
-alias cv='cvs status -v'
 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"
-alias pclean="sed -i~ -e '/^\(?\|=\+$\|unchanged:\|diff\|only\|Only\|Files\|Common\|Index:\|RCS file\|retrieving\)/d'"
+alias pclean="sed -i~ -e '/^\(?\|=\+$\|unchanged:\|diff\|only\|Only\|Tylko\|Files\|Common\|Index:\|RCS file\|retrieving\)/d'"
 
 # makes diff from PLD CVS urls
 # requires: cvs, tee
@@ -287,14 +291,6 @@ sed -e '
 ' ${1:+"$@"}
 }
 
-# chdir to file location and do 'cvs log'
-cvslog() {
-       local f="$1"
-       local d="${f%/*}"
-       [ "$d" = "$f" ] && d=.
-       (builtin cd $d && cvs log ${f##*/})
-}
-
 # does diff between FILE~ and FILE
 # the diff can be applied with patch -p1
 d() {
@@ -313,6 +309,11 @@ d() {
        (builtin cd "$dir"; dif $diff{~,})
 }
 
+# spec name from NVR
+rpm2spec() {
+       sed -re 's,^(.+)-[^-]+-[^-]+$,\1.spec,'
+}
+
 rpmb() {
        local SPEC SPECDIR arg
        for arg in "$@"; do
This page took 0.0266690000000001 seconds and 4 git commands to generate.