CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added makeCrossRootfsExtras.sh to help in port development for releases
authorJose V Beneyto <sepen@crux.nu>
Tue, 10 Sep 2013 22:02:01 +0000 (22:02 +0000)
committerJose V Beneyto <sepen@crux.nu>
Tue, 10 Sep 2013 22:02:01 +0000 (22:02 +0000)
makeCrossRootfsExtras.sh [new file with mode: 0755]

diff --git a/makeCrossRootfsExtras.sh b/makeCrossRootfsExtras.sh
new file mode 100755 (executable)
index 0000000..06bd4a5
--- /dev/null
@@ -0,0 +1,40 @@
+#!/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