Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 36 lines (27 sloc) 0.796 kB
#!/bin/bash
set -e
subdir="$1"
out="$2"
top="$PWD"
builddir="$(mktemp -d -t lockerbuild.XXXX)"
rm -rf "$builddir"
mkdir -p "$builddir/$subdir"
trap "rm -rf \"$builddir\"" EXIT
# fetch a clean copy of the code from git
echo "Fetching code..."
# This doesn't work anymore with submodules. I hate submodules.
git archive HEAD | tar -x -C "$builddir/$subdir"
git submodule foreach --quiet 'echo $path' | while read submodule; do
dest="$builddir/$subdir/$submodule"
mkdir -p "$dest"
(cd "$submodule" &&
echo "Submodule $submodule at revision" $(git rev-parse HEAD) &&
git archive HEAD | tar -x -C "$dest"
)
done
make -C "$builddir/$subdir"
mkdir -p "$builddir/$subdir/Me"
echo "Compressing..."
(cd "$builddir"; tar czf - "$subdir") > "$out"
echo "Done."
echo "$out"
Jump to Line
Something went wrong with that request. Please try again.