summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMat Booth2014-04-02 06:53:06 (EDT)
committerAlexander Kurtakov2014-04-02 09:28:24 (EDT)
commitf2f26a0c09e466a2f7ad870ee99d61fb5c562c6c (patch)
tree75abf8d04efb02ef675f219be6fd24a63385ffd5
parentd30ddf2f70e6795bc9ee080a3d4cbb46143c0371 (diff)
downloadorg.eclipse.linuxtools.eclipse-build-f2f26a0c09e466a2f7ad870ee99d61fb5c562c6c.zip
org.eclipse.linuxtools.eclipse-build-f2f26a0c09e466a2f7ad870ee99d61fb5c562c6c.tar.gz
org.eclipse.linuxtools.eclipse-build-f2f26a0c09e466a2f7ad870ee99d61fb5c562c6c.tar.bz2
Add script for generating fragment bundles for secondary arches.refs/changes/24/24324/2
Change-Id: Ia7c7666e91f4385417abc1c146d493bad68ff569 Signed-off-by: Mat Booth <mat.booth@redhat.com> Reviewed-on: https://git.eclipse.org/r/24324 Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> IP-Clean: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rwxr-xr-xutils/ensure_arch.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/utils/ensure_arch.sh b/utils/ensure_arch.sh
new file mode 100755
index 0000000..ad8c721
--- /dev/null
+++ b/utils/ensure_arch.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Ensures bundles exist for secondary arches by copying the bundle for
+# the source arch for the given target arches and performing some arch
+# name substitution on the copies.
+#
+# Usage:
+# $ ensure_arch.sh bundleDir sourceArch targetArch targetArch ...
+
+pushd $1 1>/dev/null
+src=$(ls | grep -e "gtk\.linux\.$2$" || ls | grep -e "linux\.$2$")
+if [ -z "$src" ] ; then
+ echo "no bundle found for $2"
+ exit 1
+fi
+for a in ${@:3} ; do
+ tgt=${src/$2/$a/}
+ if [ -d "$tgt" ] ; then
+ echo "bundle $tgt already exists"
+ else
+ cp -r ${src} $tgt
+ find $tgt -type f -exec sed -i -e "s/$2/$a/g" {} \;
+ echo "bundle $tgt created"
+ fi
+done
+popd 1>/dev/null \ No newline at end of file