#!/bin/bash # This script helps to create a tarball which contains 2 directories # with ports: core from upstream CRUX and core-arm overlay # Both dirs have the version number for each port that will be taken # as the starting point GIT_REPO_UPSTREAM="git://crux.nu/ports/core.git" GIT_REPO_OVERLAY="git://crux-arm.nu/crux-arm/ports/core-arm.git" # we used the tag created for CRUX and the first commit hash in CRUX-ARM # CRUX-3.0 53d838bfaa820f8398c8f7fb15f84d6800f33abc # CRUX-ARM 3.0 5371a9acf3548c955c0d19eed402827a6f1ac44a GIT_BRANCH="3.0" GIT_COMMIT_HASH_UPSTREAM="53d838bfaa820f8398c8f7fb15f84d6800f33abc" GIT_COMMIT_HASH_OVERLAY="5371a9acf3548c955c0d19eed402827a6f1ac44a" PWD_DIR=$(pwd) TMP_DIR=$(mktemp -d) cd $TMP_DIR && \ git clone $GIT_REPO_UPSTREAM && \ cd core && \ git branch $GIT_BRANCH origin/$GIT_BRANCH && \ git checkout $GIT_BRANCH && \ git fetch && \ git reset --hard $GIT_COMMIT_HASH_UPSTREAM && \ rm -rvf .git README && \ cd .. && \ git clone $GIT_REPO_OVERLAY && \ cd core-arm && \ git branch $GIT_BRANCH origin/$GIT_BRANCH && \ git checkout $GIT_BRANCH && \ git fetch && \ git reset --hard $GIT_COMMIT_HASH_OVERLAY && \ rm -rvf .git README && \ cd .. && \ tar cvJf $PWD_DIR/crossrootfs-extras-$GIT_BRANCH.tar.xz core core-arm rm -fr $TMP_DIR