Commit | Line | Data |
---|---|---|
b92a8b5f JB |
1 | #!/bin/bash |
2 | ||
3 | # This script helps to create a tarball which contains 2 directories | |
4 | # with ports: core from upstream CRUX and core-arm overlay | |
5 | # Both dirs have the version number for each port that will be taken | |
6 | # as the starting point | |
7 | ||
8 | GIT_REPO_UPSTREAM="git://crux.nu/ports/core.git" | |
9 | GIT_REPO_OVERLAY="git://crux-arm.nu/crux-arm/ports/core-arm.git" | |
10 | ||
11 | # we used the tag created for CRUX and the first commit hash in CRUX-ARM | |
12 | # CRUX-3.0 53d838bfaa820f8398c8f7fb15f84d6800f33abc | |
b226af88 | 13 | # CRUX-ARM 3.0 77e92f931b068afe118990597ec74fcae81c23f4 |
b92a8b5f JB |
14 | GIT_BRANCH="3.0" |
15 | GIT_COMMIT_HASH_UPSTREAM="53d838bfaa820f8398c8f7fb15f84d6800f33abc" | |
b226af88 | 16 | GIT_COMMIT_HASH_OVERLAY="77e92f931b068afe118990597ec74fcae81c23f4" |
b92a8b5f JB |
17 | |
18 | PWD_DIR=$(pwd) | |
19 | TMP_DIR=$(mktemp -d) | |
20 | ||
21 | cd $TMP_DIR && \ | |
22 | git clone $GIT_REPO_UPSTREAM && \ | |
23 | cd core && \ | |
24 | git branch $GIT_BRANCH origin/$GIT_BRANCH && \ | |
25 | git checkout $GIT_BRANCH && \ | |
26 | git fetch && \ | |
27 | git reset --hard $GIT_COMMIT_HASH_UPSTREAM && \ | |
28 | rm -rvf .git README && \ | |
29 | cd .. && \ | |
30 | git clone $GIT_REPO_OVERLAY && \ | |
31 | cd core-arm && \ | |
32 | git branch $GIT_BRANCH origin/$GIT_BRANCH && \ | |
33 | git checkout $GIT_BRANCH && \ | |
34 | git fetch && \ | |
35 | git reset --hard $GIT_COMMIT_HASH_OVERLAY && \ | |
36 | rm -rvf .git README && \ | |
37 | cd .. && \ | |
38 | tar cvJf $PWD_DIR/crossrootfs-extras-$GIT_BRANCH.tar.xz core core-arm | |
39 | ||
40 | rm -fr $TMP_DIR |