aboutsummaryrefslogtreecommitdiffstats
path: root/build/templates/compass_core.tmpl
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-08 07:47:19 -0400
committerbaigk <baiguoku@huawei.com>2015-09-08 08:24:09 -0400
commitcf87d3067a63cb8be315a3addfd9c27d86be3b5a (patch)
tree861d46aebc75c73cc13a19fecfb5c48aa88a56a1 /build/templates/compass_core.tmpl
parent633175ed2c5d0ab339027ba0a542bcdd4d3769c0 (diff)
Build improvement for speedup and using public repo
JIRA: COMPASS-19 Change-Id: Iba101807e1bd2f843f1253791b7e87e1acb7934b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'build/templates/compass_core.tmpl')
-rw-r--r--build/templates/compass_core.tmpl23
1 files changed, 23 insertions, 0 deletions
diff --git a/build/templates/compass_core.tmpl b/build/templates/compass_core.tmpl
new file mode 100644
index 00000000..9c88cc4f
--- /dev/null
+++ b/build/templates/compass_core.tmpl
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -x
+yum install tar -y
+
+#download packages
+#set packages = $getVar('default_packages', [])
+#for pkg in $packages
+yum -y install $pkg
+#end for
+#set packages = $getVar('packages', [])
+#for pkg in $packages
+yum -y install $pkg
+#end for
+
+#make repo
+
+mkdir -p /centos6-package
+
+find /var/cache/yum/ -name *.rpm | xargs -i cp {} /centos6-package
+
+find /centos6-package -size 0 -name *.rpm | xargs rm -f
+
+tar -zcvf /centos6-package.tar.gz /centos6-package