summary refs log tree commit diff
path: root/scripts/archive.sh
blob: f8b1a82ced2b245713b15b101fec8b94a072c29b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/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" --