Merge "Revert "Patch 1431"" into dev/icn-v0.2.0
[icn.git] / tools / collect.sh
diff --git a/tools/collect.sh b/tools/collect.sh
new file mode 100755 (executable)
index 0000000..e8a1bde
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+
+set -ex
+
+SCRIPT_PATH=`realpath $0`
+TOOL_PATH=`dirname "$SCRIPT_PATH"`
+ICN_PATH=`dirname $TOOL_PATH`
+# Get into workspace directory, we run every following command from the workspace directory
+cd $ICN_PATH/../
+
+mkdir -p $ICN_PATH/apt/deb/
+
+# Call scripts to collect everything from Internet,
+# all the collected files need to be put under ICN_PATH
+for collect_sh in `find icn/ -name collect_*.sh | sort`
+do
+  collect_parent=`dirname $collect_sh`
+  pushd $collect_parent
+    bash `basename $collect_sh` $ICN_PATH
+  popd
+done