aboutsummaryrefslogtreecommitdiffstats
path: root/git-repository--after-tarball
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2019-12-26 22:22:47 +0200
committerJani Välimaa <wally@mageia.org>2019-12-26 22:22:47 +0200
commit98c2d2b8c69185ba23a66c4004b2a09a1d48e093 (patch)
tree7cebcb85d3de5bfed093373e4cafc4dd17760776 /git-repository--after-tarball
parent9e86a885d803a5859ab0546e4b2d21fbfaa2cb85 (diff)
downloadrpm-setup-98c2d2b8c69185ba23a66c4004b2a09a1d48e093.tar
rpm-setup-98c2d2b8c69185ba23a66c4004b2a09a1d48e093.tar.gz
rpm-setup-98c2d2b8c69185ba23a66c4004b2a09a1d48e093.tar.bz2
rpm-setup-98c2d2b8c69185ba23a66c4004b2a09a1d48e093.tar.xz
rpm-setup-98c2d2b8c69185ba23a66c4004b2a09a1d48e093.zip
Remove unused git-repository--after-tarball and git-repository--apply-patch
Diffstat (limited to 'git-repository--after-tarball')
-rwxr-xr-xgit-repository--after-tarball70
1 files changed, 0 insertions, 70 deletions
diff --git a/git-repository--after-tarball b/git-repository--after-tarball
deleted file mode 100755
index b9aa92f..0000000
--- a/git-repository--after-tarball
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh -ex
-
-# usage: git-repository--after-tarball [<tarballs>]
-# with optional environment variables:
-# - GIT_URL="git://xxx/foo.git [branch]"
-# - GIT_REPOSITORY_CACHE=/zzz/foo.git
-#
-# the GIT_REPOSITORY_CACHE can be used with or without GIT_URL
-# - if GIT_URL is given, GIT_REPOSITORY_CACHE will be a "bare" clone of GIT_URL
-# - otherwise, GIT_REPOSITORY_CACHE can be created using:
-# % git clone --bare BUILD/foo-1 $GIT_REPOSITORY_CACHE
-# where foo-1 is the previous version
-
-
-tarballs="$*"
-
-
-git_clone_in_cwd() {
- URL=$1
- [ -n "$2" ] && BRANCH="origin/$2"
-
- git clone $URL .git-tmp
-
- cd .git-tmp
- git checkout $BRANCH
- cd ..
-
- mv .git-tmp/.git .
- rm -r .git-tmp
-}
-
-our_git_clone() {
- URL=$1
- HEAD=$2
-
- if [ -n "$GIT_REPOSITORY_CACHE" ]; then
- if [ -d "$GIT_REPOSITORY_CACHE" ]; then
- cd "$GIT_REPOSITORY_CACHE"
- git fetch $GIT_URL
- cd -
- else
- git clone --bare $URL "$GIT_REPOSITORY_CACHE"
- fi
- git_clone_in_cwd "$GIT_REPOSITORY_CACHE" $HEAD
- else
- git_clone_in_cwd $URL $HEAD
- fi
-}
-
-set_GIT_AUTHOR_DATE() {
- # taking date of first tarball, sorry for the other tarballs ;)
- tarball=$1
- export GIT_AUTHOR_DATE=`stat -c '%y' "$RPM_SOURCE_DIR/$tarball"`
-}
-
-if [ ! -e .git ]; then
- if [ -n "$GIT_URL" ]; then
- our_git_clone $GIT_URL
- elif [ -n "$GIT_REPOSITORY_CACHE" -a -d "$GIT_REPOSITORY_CACHE" ]; then
- git_clone_in_cwd "$GIT_REPOSITORY_CACHE" vanilla
- else
- git init
- fi
-fi
-git add .
-set_GIT_AUTHOR_DATE $tarballs
-git commit -q -a --author="unknown author <mageia-dev@mageia.org>" -m "imported $tarballs"
-git branch -f vanilla
-git branch -f patches-applied
-git checkout patches-applied