Skip to content

Commit

Permalink
package: archive script is the same as in dnf
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Silhan committed Jan 13, 2015
1 parent 09cbb14 commit 2aaf9a8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions package/archive
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash
GITREV=`git rev-parse --short HEAD`
#! /bin/bash

GITREV=`git log|head -1| sed 's/commit //'`
[[ $# -gt 1 ]] && GITREV=$1

# shorten to 7 characters
GITREV=${GITREV:0:7}

echo $GITREV
git archive ${GITREV} --prefix=dnf-plugins-core/ | xz > dnf-plugins-core-${GITREV}.tar.xz

TARGET_DIR=$HOME/rpmbuild/SOURCES
mkdir -p $TARGET_DIR
git archive ${GITREV} --prefix=dnf-plugins-core/ | xz > $TARGET_DIR/dnf-plugins-core-${GITREV}.tar.xz

0 comments on commit 2aaf9a8

Please sign in to comment.