diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-31 13:19:32 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-31 13:19:32 +0200 |
commit | 1a3369877e940447a75ec1ec1f42776dce283f37 (patch) | |
tree | 57c130df989a9e6144e612a565e6a240e1cad449 /scripts/archive.sh | |
parent | matrix-structs: Fix historical user ID decoding (diff) | |
download | nheko-1a3369877e940447a75ec1ec1f42776dce283f37.tar.xz |
Update travis
Diffstat (limited to 'scripts/archive.sh')
-rwxr-xr-x | scripts/archive.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/archive.sh b/scripts/archive.sh new file mode 100755 index 00000000..d963e51e --- /dev/null +++ b/scripts/archive.sh @@ -0,0 +1,14 @@ +#!/bin/bash -e + +TAG=`git tag -l --points-at HEAD` +PREFIX=$(basename "$(pwd -P)") + +if [ ! -z $TAG ]; then + PREFIX=$(basename "$(pwd -P)").$TAG +fi + +{ + git ls-files + git submodule foreach --recursive --quiet \ + 'git ls-files --with-tree="$sha1" | sed "s#^#$path/#"' +} | sed "s#^#$PREFIX/#" | xargs tar -c -C.. -f "$PREFIX.tar.bz2" -- |