summaryrefslogtreecommitdiffstats
path: root/build/dpdk-snap/dpdk-snapshot.sh
blob: 1546f3b585fdf033bd914897a0aec2ef3b6647ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

snapgit=`git log --pretty=oneline -n1|cut -c1-8`
snapser=`git log --pretty=oneline | wc -l`

makever=`make showversion`
basever=`echo ${makever} | cut -d. -f-2`

prefix=dpdk-${basever}-${snapser}.git${snapgit}
archive=${prefix}.tar.gz

echo "Creating ${archive}"
git archive --prefix=${prefix}/ HEAD  | gzip -9 > ${archive}