support customized images and locales
This commit is contained in:
6
build.sh
6
build.sh
@@ -121,6 +121,7 @@ fi
|
||||
|
||||
case "${pkgtype}" in
|
||||
rpm)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
|
||||
ProcList="restagent crontask sshsvc captrace data2html"
|
||||
cd $EmsBEDir
|
||||
@@ -179,8 +180,10 @@ case "${pkgtype}" in
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum $RpmPkgRename >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
deb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
ProcList="restagent crontask sshsvc captrace data2html"
|
||||
cd $EmsBEDir
|
||||
@@ -257,8 +260,10 @@ case "${pkgtype}" in
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======="
|
||||
;;
|
||||
badeb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
ProcList="restagent crontask sshsvc captrace data2html"
|
||||
cd $EmsBEDir
|
||||
@@ -328,6 +333,7 @@ case "${pkgtype}" in
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
|
||||
BIN
customized/agt.d/images/background_dark.jpg
Normal file
BIN
customized/agt.d/images/background_dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 B |
BIN
customized/agt.d/images/background_light.jpg
Normal file
BIN
customized/agt.d/images/background_light.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
0
customized/agt.d/locales/.gitkeep
Normal file
0
customized/agt.d/locales/.gitkeep
Normal file
BIN
customized/ba.d/images/background_dark.jpg
Normal file
BIN
customized/ba.d/images/background_dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 216 KiB |
BIN
customized/ba.d/images/background_light.jpg
Normal file
BIN
customized/ba.d/images/background_light.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 216 KiB |
2
customized/ba.d/locales/zh-CN.ts
Normal file
2
customized/ba.d/locales/zh-CN.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export default {
|
||||
};
|
||||
BIN
customized/omc.d/images/background_dark.jpg
Normal file
BIN
customized/omc.d/images/background_dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 B |
BIN
customized/omc.d/images/background_light.jpg
Normal file
BIN
customized/omc.d/images/background_light.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
0
customized/omc.d/locales/.gitkeep
Normal file
0
customized/omc.d/locales/.gitkeep
Normal file
32
makepkg.sh
32
makepkg.sh
@@ -11,6 +11,7 @@ usage() {
|
||||
echo " -m, =be|fe|all be: only process back-end code, default if non input"
|
||||
echo " fe: only process front-end code"
|
||||
echo " all: process all include be and fe"
|
||||
echo " -c, =ba ba: customized for BA OMC"
|
||||
}
|
||||
|
||||
pkgtype=""
|
||||
@@ -49,8 +50,11 @@ while getopts "m:r:c:d" option; do
|
||||
be_args+=("-d")
|
||||
;;
|
||||
c)
|
||||
pkgtype="badeb"
|
||||
be_args+=("$pkgtype")
|
||||
c_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
|
||||
if [ "${c_arg}" == "ba" ]; then
|
||||
pkgtype="badeb"
|
||||
be_args+=("${pkgtype}")
|
||||
fi
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
@@ -66,18 +70,40 @@ if [ ! -d ${rootdir} ]; then
|
||||
fi
|
||||
|
||||
bedir=${rootdir}/be.ems
|
||||
fedir=${rootdir}/fe.ems.vue3
|
||||
|
||||
builddir=${rootdir}/build.ems
|
||||
buildcustomized=${builddir}/customized
|
||||
customizeddir=${buildcustomized}/${c_arg}.d
|
||||
|
||||
fedir=${rootdir}/fe.ems.vue3
|
||||
feassetsdir=${fedir}/src/assets
|
||||
felocalesdir=${fedir}/src/i18n/locales
|
||||
feconstantsdir=${fedir}/src/constants
|
||||
fehooksdir=${fedir}/src/hooks
|
||||
|
||||
makefe() {
|
||||
cd ${fedir}
|
||||
git checkout ${feassetsdir}
|
||||
git checkout ${felocalesdir}
|
||||
git checkout ${feconstantsdir}
|
||||
git checkout ${fehooksdir}
|
||||
git pull
|
||||
if [ "${pkgtype}" == "badeb" ]; then
|
||||
cp -rf ${customizeddir}/images/* ${feassetsdir}
|
||||
cp -rf ${customizeddir}/locales/* ${felocalesdir}
|
||||
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥]//g' {} +
|
||||
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥]//g' {} +
|
||||
fi
|
||||
npm install --force --registry https://registry.npmmirror.com
|
||||
echo -n "Building front-end vue ... "
|
||||
npm run build 1>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo "done"
|
||||
fi
|
||||
git checkout ${feassetsdir}
|
||||
git checkout ${felocalesdir}
|
||||
git checkout ${feconstantsdir}
|
||||
git checkout ${fehooksdir}
|
||||
}
|
||||
|
||||
makebe() {
|
||||
|
||||
Reference in New Issue
Block a user