clone_samples()
{
mkdir -p "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}/"
- for sample_git_path in ${WEB_SAMPLE_GIT_LIST}
- do
- cd ${SRCDIR}/temp
- git clone ${GIT_REPOSITORY}:${sample_git_path}
- sampledir=`basename ${sample_git_path}`
- cd "${SRCDIR}/temp/${sampledir}"
- git checkout ${BRANCH}
- cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}/"
- done
+ for sample_git_path in ${WEB_SAMPLE_GIT_LIST}
+ do
+ cd ${SRCDIR}/temp
+ git clone ${GIT_REPOSITORY}:${sample_git_path}
+ sampledir=`basename ${sample_git_path}`
+ cd "${SRCDIR}/temp/${sampledir}"
+ git checkout ${BRANCH}
+ cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}/"
+ done
+ cd "${SRCDIR}/${WEB_SAMPLE_DEST_DIR}"
+ remove_misc_files
+
#clone hybrid webapp
mkdir -p "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}/"
- for sample_git_path in ${HYBRID_SAMPLE_GIT_LIST}
- do
- cd ${SRCDIR}/temp
- git clone ${GIT_REPOSITORY}:${sample_git_path}
- sampledir=`basename ${sample_git_path}`
- cd "${SRCDIR}/temp/${sampledir}"
- git checkout ${BRANCH}
- cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}/"
- done
+ for sample_git_path in ${HYBRID_SAMPLE_GIT_LIST}
+ do
+ cd ${SRCDIR}/temp
+ git clone ${GIT_REPOSITORY}:${sample_git_path}
+ sampledir=`basename ${sample_git_path}`
+ cd "${SRCDIR}/temp/${sampledir}"
+ git checkout ${BRANCH}
+ cp -rf "${SRCDIR}/temp/${sampledir}" "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}/"
+ done
+
+ cd "${SRCDIR}/${HYBRID_SAMPLE_DEST_DIR}"
+ remove_misc_files
+
+ cd "${SRCDIR}"
+}
+
+remove_misc_files()
+{
+ find . -type f -name "CMakeLists.txt" -exec rm -rf {} \;
+ find . -type f -name "nofile.dummy" -exec rm -rf {} \;
+ find . -depth -type d -name ".git" -exec rm -rf {} \;
+ find . -depth -type d -name "packaging" -exec rm -rf {} \;
}
# install