代码拉取完成,页面将自动刷新
同步操作将从 openEuler/oemaker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
:<<!
* Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved.
* iSulad licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v2 for more details.
* Author: zhuchunyi
* Create: 2020-08-05
* Description: provide container buffer functions
!
#!/bin/bash
set -e
function oemaker_usage()
{
cat << EOF
Usage: oemaker [-h] [-t Type] [-p Product] [-v Version] [-r RELEASE] [-s REPOSITORY]
optional arguments:
-t Type ISO Type, include standard debug and source
-p Product Product Name, such as: openEuler
-v Version version identifier
-r RELEASE release information
-s REPOSITORY source dnf repository address link(may be listed multiple times)
-h show the help message and exit
EOF
}
function parse_cmd_line()
{
#param init
ARCH="$(uname -m)"
if [ "${ARCH}" = "aarch64" ] || [ "${ARCH}" = "x86_64" ];then
CONFIG_FILE="${CPATH}/config/${ARCH}/standard.conf"
source "${CONFIG_FILE}"
else
echo "unsupported architectures: ${ARCH}"
return 1
fi
PRODUCT="${CONFIG_PRODUCT}"
VERSION="${CONFIG_VERSION}"
RELEASE="${CONFIG_RELEASE}"
REPOS1="${CONFIG_YUM_REPOS}"
# parse input params
while getopts ":p:v:r:s:t:h" opt
do
case "$opt" in
p)
PRODUCT="$OPTARG"
;;
v)
VERSION="$OPTARG"
;;
r)
RELEASE="$OPTARG"
;;
s)
REPOS1="$OPTARG"
;;
t)
ISO_TYPE="$OPTARG"
;;
h)
oemaker_usage
exit 0
;;
?)
echo "error: please check the params."
oemaker_usage
return 1
;;
esac
done
for typename in standard source debug
do
if [ "${typename}" == "${ISO_TYPE}" ];then
return 0
fi
done
echo "unsupported iso type: ${ISO_TYPE}"
echo "supported iso types: standard source and debug"
return 1
}
function global_var_init()
{
if [ "X$CONFIG_FILE" != "X" -a -f "$CONFIG_FILE" ];then
source "${CONFIG_FILE}";
fi
TYPE="iso"
BUILD="${OUTPUT_DIR}"/tmp
SRC_DIR="$OUTPUT_DIR"/tmp/src
DBG_DIR="$OUTPUT_DIR"/tmp/dbg
RELEASE_NAME="${PRODUCT}-${VERSION}-${RELEASE}-${ARCH}"
STANDARD_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-${ARCH}-dvd.iso"
SRC_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-source-dvd.iso"
DBG_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-debug-${ARCH}-dvd.iso"
[ ! -d "${BUILD}" ] && mkdir -p "${BUILD}"
[ -d "${BUILD}"/iso ] && rm -rf "${BUILD}"/iso
set +e
setenforce 0
if [ "X$CONFIG_FILE" != "X" ];then
YUMREPO="$CONFIG_YUM_REPOS"
CONFIG="$CONFIG_PACKAGES_LIST_FILE"
else
YUMREPO="-s $YUM_REPO"
CONFIG=""
fi
REPOS=$(echo "$REPOS1")
if [ "X$REPOS" != "X" ];then
REPOS=$(echo " ""${REPOS}" | sed 's/ / -s /g')
YUMREPO="${REPOS}"
fi
set -e
return 0
}
function init_config()
{
[ -f "${BUILD}"/isopackage.sdf ] && cp "${BUILD}"/isopackage.sdf "${BUILD}"/iso/
if [ ! -z "$CONFIG_KS_FILE" ]; then
mkdir -p "${BUILD}"/iso/ks
cp "$CONFIG_KS_FILE" "${BUILD}"/iso/ks/
fi
if [ ! -f "${BUILD}/docs/OpenEuler-Software-License.docx" ]; then
mkdir -p "${BUILD}"/iso/docs
cp "${CPATH}"/docs/* "${BUILD}"/iso/docs/
fi
return 0
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。