matrixion/scripts/archive.sh

9 lines
252 B
Bash
Raw Permalink Normal View History

2017-12-31 14:19:32 +03:00
#!/bin/bash -e
PREFIX=$(basename "$(pwd -P)")
{
git ls-files
git submodule foreach --recursive --quiet \
'git ls-files --with-tree="$sha1" | sed "s#^#$path/#"'
} | sed "s#^#$PREFIX/#" | xargs tar -c -j -C.. -f "$PREFIX.tar.bz2" --