commit:     c74a1295bf28ba0bf0f0de5324bf70aecba4e501
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 20 20:12:08 2014 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Apr 20 20:12:08 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/apache.git;a=commit;h=c74a1295

Modifications to support GIT instead of SVN

---
 rolltarball.sh | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/rolltarball.sh b/rolltarball.sh
index 193b1bd..d296b5b 100755
--- a/rolltarball.sh
+++ b/rolltarball.sh
@@ -12,13 +12,16 @@
 # Contributors:
 #      Michael Stewart <veric...@gentoo.org> (Primary Maintainer)
 #      Christian Parpart <tra...@gentoo.org>
+#      Lars Wendler <polynomia...@gentoo.org>
 #
 # Changes:
 #      05-Jun-2005     Complete rewrite to clean up code
+#      20-Apr-2014     Use git instead of svn
 #
-MYVERSION='$Revision$'
-MYVERSION=${MYVERSION#* }
-MYVERSION=${MYVERSION% *}
+
+# Please increase version number before each commit which includes changes to
+# this script.
+MYVERSION='2.0'
 
 # ********** Begin functions **********
 
@@ -59,7 +62,7 @@ Where options is any of:
     --quiet         Set verbosity to 0
 -q                  Lower verbosity by 1
 -s  --datestamp     Use alternate datestamp
--u  --user=username Gentoo Username (Required)
+-u  --user=username Gentoo Username (Default: auto-detected)
     --verbosity=n   Verbosity Level (0-4)
 -v                  Increase verbosity by 1
 
@@ -335,12 +338,8 @@ fi
 
 if [ -z "${G_USER}" ]
 then
-# Autodetect not available for SVN
-#      G_USER=$(cat CVS/Root)
-#      G_USER=${G_USER/:ext:/}
-#      G_USER=${G_USER%@*}
-#      einfo "Detected Gentoo Developer: ${G_USER}"
-       usage "Gentoo Developer Not specified!"
+       G_USER="$(git log -1 | grep ^Author | sed 
's&.*<\([[:alnum:]\._-]\+\)@.*>&\1&')"
+       einfo "Detected Gentoo Developer: ${G_USER}"
 fi
 
 edebug "Current configuration:"
@@ -359,8 +358,8 @@ edebug "  VERBOSE: ${VERBOSE}"
 my_mtime=$(stat --format=%Y $0)
 
 ebegin "Updating tree"
-svn up >&9
-eend $? "svn update failed!" || die
+git pull >&9
+eend $? "git update failed!" || die
 
 new_mtime=$(stat --format=%Y $0)
 if [ "${my_mtime}" -ne "${new_mtime}" ]
@@ -432,8 +431,8 @@ build_tarball() {
                echo ${CURTIME} > ${TB_DIR}/DATESTAMP
                echo "Packaged by ${G_USER}" >> ${TB_DIR}/DATESTAMP
                echo "$0 v${MYVERSION}" >> ${TB_DIR}/DATESTAMP
-               edebug "Create bzip2-ed tarball ${TB} from ${TB_DIR} excluding 
.svn"
-               tar --create --bzip2 --verbose --exclude=.svn --exclude=*~ 
--file ${TB} ${TB_DIR} >&9
+               edebug "Create bzip2-ed tarball ${TB} from ${TB_DIR} excluding 
vcs files"
+               tar --create --bzip2 --verbose --exclude-vcs --exclude=*~ 
--file ${TB} ${TB_DIR} >&9
                eend $? "Tarball creation failed" || die
                edebug "Remove temporary directory" 
                rm -rf ${TB_DIR} || ewarn "Couldn't clean up, manually remove 
${TB_DIR}/"

Reply via email to