Files
2022-09-16 11:48:59 +08:00

76 lines
2.0 KiB
Bash

#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2010-2020. All rights reserved.
# description: the script that make install unixODBC
# date: 2019-12-28
# version: 1.1
# history:
set -e
WORK_PATH="$(dirname $0)"
source "${WORK_PATH}/build_global.sh"
source "${WORK_PATH}/build_comm.sh"
source "${WORK_PATH}/build_shrink.sh"
#######################################################################
# main
#######################################################################
function main()
{
case "${BUILD_OPTION}" in
build)
build_component
;;
shrink)
shrink_component
;;
dist)
dist_component
;;
clean)
clean_component
;;
all)
build_component
shrink_component
dist_component
clean_component
;;
*)
log "Internal Error: option processing error: $2"
log "please input right paramenter values build, shrink, dist or clean "
esac
}
########################################################################
if [ $# = 0 ] ; then
log "missing option"
print_help
exit 1
fi
##########################################################################
#read command line paramenters
##########################################################################
while [ $# -gt 0 ]; do
case "$1" in
-h|--help)
print_help
exit 1
;;
-m|--build_option)
if [ "$2"X = X ];then
die "no given version number values"
fi
BUILD_OPTION=$2
shift 2
;;
*)
log "Internal Error: option processing error: $1" 1>&2
log "please input right paramtenter, the following command may help you"
log "./build.sh --help or ./build.sh -h"
exit 1
esac
done
###########################################################################
main