matrixion/scripts/archive.sh
2019-04-24 01:55:05 +02:00

10 lines
256 B
Bash
Executable file

#!/bin/sh
set -eu
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" --