summaryrefslogtreecommitdiffstats
path: root/dlothers.sh
blob: 6a7fd8f26ec0d4a1d58f99b6916a4a602671a933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# This was borrowed from nodejs-grunt-contrib-concat

tag=v1.8.0

set -e

tmp=$(mktemp -d)

trap cleanup EXIT
cleanup() {
    set +e
    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}

unset CDPATH
pwd=$(pwd)

pushd "$tmp"
git clone https://github.com/WordPress/Requests.git
ls
cd Requests
git archive --prefix="docs/" --format=tar ${tag}:docs/ \
    | bzip2 > "$pwd"/docs-${tag}.tar.bz2
git archive --prefix="examples/" --format=tar ${tag}:examples/ \
    | bzip2 > "$pwd"/examples-${tag}.tar.bz2
git archive --prefix="tests/" --format=tar ${tag}:tests/ \
    | bzip2 > "$pwd"/tests-${tag}.tar.bz2
popd