return ${RET}
}
+function prepare_rootstrap_resource {
+ local rootstrap_type=$1
+ local rootstrap_resource_dir=$2
+
+ rm -rf "${rootstrap_resource_dir}"
+ case ${rootstrap_type} in
+ "headed")
+ cp -r "/tmp/rs_resource/${rootstrap_type}" "${rootstrap_resource_dir}"
+ ;;
+ *)
+ find "/tmp/rs_resource" \
+ -maxdepth 1 -mindepth 1 \
+ ! -wholename '*/headed' \
+ -exec cp -r {} ${rootstrap_resource_dir} \;
+ ;;
+ esac
+}
+
function generate_rootstrap {
local arch=$1
local rootstrap_type=$2
include_internal_option=""
fi
- rm -rf "${rootstrap_resource_dir}"
- cp -r "/tmp/rs_resource/${ROOTSTRAP_TYPE}" "${rootstrap_resource_dir}"
+ prepare_rootstrap_resource "${rootstrap_type}" "${rootstrap_resource_dir}"
case "${arch}" in
"arm")