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