3 cd ./$(git rev-parse --show-cdup)
5 if ! git submodule foreach --quiet 'git diff-files --quiet && git diff-index --quiet HEAD'
7 echo >&2 "Submodules are not clean"
11 if ! git diff-files --quiet || ! git diff-index --quiet HEAD
13 echo >&2 "The work tree is not clean"
17 VERSION=`git describe|sed -e s/^v//`
19 ( git submodule foreach --quiet 'git ls-files|sed -e "s|^|$path/|"'; \
20 git ls-files -s|grep -v ^16|awk '{print $4;}' ) \
21 | grep -v '\(.gitignore\|.gitmodules\)' | \
22 tar -czf frsh-forb-${VERSION}.tar.gz --files-from - --transform "s|^\([^\.].*\)|frsh-forb-${VERSION}/\1|"