packaging/make-git-snapshot.sh: Add missing file
This commit is contained in:
parent
d8e6bd88e6
commit
466d9dbe33
32
packaging/make-git-snapshot.sh
Executable file
32
packaging/make-git-snapshot.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
srcdir=$1
|
||||
shift
|
||||
PKG_VER=$1
|
||||
shift
|
||||
GITREV=$1
|
||||
shift
|
||||
|
||||
TARFILE=${PKG_VER}.tar
|
||||
TARFILE_TMP=${TARFILE}.tmp
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
test -n "${srcdir}"
|
||||
test -n "${PKG_VER}"
|
||||
test -n "${GITREV}"
|
||||
|
||||
TOP=$(git rev-parse --show-toplevel)
|
||||
|
||||
echo "Archiving ${PKG_VER} at ${GITREV} to ${TARFILE_TMP}"
|
||||
(cd ${TOP}; git archive --format=tar --prefix=${PKG_VER}/ ${GITREV}) > ${TARFILE_TMP}
|
||||
ls -al ${TARFILE_TMP}
|
||||
(cd ${TOP}; git submodule status) | while read line; do
|
||||
rev=$(echo ${line} | cut -f 1 -d ' '); path=$(echo ${line} | cut -f 2 -d ' ')
|
||||
echo "Archiving ${path} at ${rev}"
|
||||
(cd ${srcdir}/${path}; git archive --format=tar --prefix=${PKG_VER}/${path}/ ${rev}) > submodule.tar
|
||||
tar -A -f ${TARFILE_TMP} submodule.tar
|
||||
rm submodule.tar
|
||||
done
|
||||
mv ${TARFILE_TMP} ${TARFILE}
|
Loading…
Reference in New Issue
Block a user