Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
>
kernel-adaptation-joggler
> git2tarball.sh
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File git2tarball.sh of Package kernel-adaptation-joggler
#!/bin/bash # This creates a set of patches from a given mainline version # Usage: git2tarball.sh <OBS package directory> <version> # version should pkgdir=$1 version=$2 gittag="v${version}" [ -d $pkgdir/.osc ] || { echo "$pkgdir is not an OBS pkg directory" exit 1 } [[ $(git tag -l $gittag) == "$gittag" ]] || { echo "$gittag is not a valid git tag" exit 1 } git archive ${gittag} --format=tar --prefix=kernel/ | gzip > ${pkgdir}/kernel-${gittag}-src.tar.gz echo "Use the following sections in your yaml file" echo "Version: ${version}" echo "Patches:" git format-patch -o ${pkgdir} ${gittag} | while IFS= read -r line do echo " - $(basename $line)" done