36 lines
967 B
Bash
36 lines
967 B
Bash
#!/bin/bash
|
|
# Copyright (c) Huawei Technologies Co., Ltd. 2010-2022. All rights reserved.
|
|
# description: the script that make install cjson
|
|
# date: 2020-08-10
|
|
# version: 2.0
|
|
# history:
|
|
# 2019-5-5 update to cjson 1.7.11 from 1.7.7
|
|
# 2019-12-28 fix buildcheck warning
|
|
# 2020-06-22 fix buildcheck warning
|
|
# 2020-08-10 update to cjson 1.7.13 from 1.7.11
|
|
|
|
set -e
|
|
|
|
#######################################################################
|
|
# clean component
|
|
#######################################################################
|
|
function clean_component()
|
|
{
|
|
cd ${LOCAL_DIR}/${SOURCE_CODE_PATH}
|
|
if [ $? -ne 0 ]; then
|
|
die "[Error] cd ${LOCAL_DIR}/${SOURCE_CODE_PATH} failed."
|
|
fi
|
|
|
|
make clean
|
|
|
|
cd ${LOCAL_DIR}
|
|
if [ $? -ne 0 ]; then
|
|
die "[Error] cd ${LOCAL_DIR} failed."
|
|
fi
|
|
[ -n "${SOURCE_CODE_PATH}" ] && rm -rf ${SOURCE_CODE_PATH}
|
|
rm -rf install_*
|
|
rm -rf *.log
|
|
|
|
log "[Notice] cjson clean has been finished!"
|
|
}
|