Projects
home:jnweiger
dvswitch-git
gitfetch.sh
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gitfetch.sh of Package dvswitch-git
#! /bin/sh ## ## This is where upstream development is going on: ## ## FIXME: We should be using git archive from the remote repo ## But it does not work for me at all. set -x ## this works only from within the checkout # git archive susedevel --prefix dvswitch-0.9-susedevel-1457797/ -o bs/dvswitch-0.9-susedevel-1457797.tar.gz -9 name=dvswitch version=0.9 branch=susedevel fmt=tar.gz git clone https://github.com/jnweiger/$name.git --depth 1 -b $branch cd $name # the branch name ($2) below, can have whitespace. chop it away by # comparing with the non-verbose output. # E.g.: # * (no branch) c150b38 Upload # git branch $branch branch__=$(git branch) branch_v=$(git branch -vv) commit=$(echo ${branch_v:${#branch__}} | awk '{print $1}') archive=$name-$version-$branch-$commit ## the / is important here! git archive $branch -v --format $fmt --prefix $archive/ -o ../$archive.$fmt git log --reverse -n 1 | cat git branch -vv cd .. rm -rf $name ls -l $archive.$fmt exit 0 ########################################################################################### ### old code below, we pulled from upstream and applied many patches. this is too tedious. name=dvswitch tag=0.9-1 fmt=tar.gz git clone git://anonscm.debian.org/dvswitch/$name.git # -b $tag cd $name # the branch name ($2) below, can have whitespace. chop it away by # comparing with the non-verbose output. # E.g.: # * (no branch) c150b38 Upload # branch__=$(git branch) branch_v=$(git branch -vv) commit=$(echo ${branch_v:${#branch__}} | awk '{print $1}') archive=$name-$tag-$commit ## the / is important here! git archive master -v --format $fmt --prefix $archive/ -o ../$archive.$fmt git log --reverse -n 1 | cat git branch -vv cd .. rm -rf $name ls -l $archive.$fmt
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.