summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2014-04-20 22:12:08 +0200
committerLars Wendler <polynomial-c@gentoo.org>2014-04-20 22:12:08 +0200
commitc74a1295bf28ba0bf0f0de5324bf70aecba4e501 (patch)
tree38cef55511faa23b1e491165f18cc4eb52710b33 /rolltarball.sh
parentDisabled SSLCompression by default (bug #507324). Replaced old weak with stro... (diff)
downloadapache-c74a1295bf28ba0bf0f0de5324bf70aecba4e501.tar.gz
apache-c74a1295bf28ba0bf0f0de5324bf70aecba4e501.tar.bz2
apache-c74a1295bf28ba0bf0f0de5324bf70aecba4e501.zip
Modifications to support GIT instead of SVN
Diffstat (limited to 'rolltarball.sh')
-rwxr-xr-xrolltarball.sh27
1 files 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 <vericgar@gentoo.org> (Primary Maintainer)
# Christian Parpart <trapni@gentoo.org>
+# Lars Wendler <polynomial-c@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}/"