3 # COPYRIGHT NOTICE STARTS HERE
5 # Copyright 2018 © Samsung Electronics Co., Ltd.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # COPYRIGHT NOTICE ENDS HERE
26 RELATIVE_PATH=./ # relative path from this script to 'common-functions.sh'
27 if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then
28 SCRIPT_DIR=$(dirname "${0}")
29 LOCAL_PATH=$(readlink -f "$SCRIPT_DIR")
30 . "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh
35 message info "no argument supplied, keeping default naming: $VERSION"
40 # name of the self-extract-installer
41 TARGET_FILE="$APROJECT_DIR/selfinstall_onap_beijing_"$VERSION".sh"
43 # inserting the head of the script
44 cat > "$TARGET_FILE" <<EOF
48 # This is self-extract installer for onap
55 SCRIPT_DIR=\$(dirname "\${0}")
56 APROJECT_DIR=\$(readlink -f "\$SCRIPT_DIR")
61 # splicing the scripts together
62 cat "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh >> "$TARGET_FILE"
63 cat "${LOCAL_PATH}"/"${RELATIVE_PATH}"/deploy_nexus.sh >> "$TARGET_FILE"
64 cat "${LOCAL_PATH}"/"${RELATIVE_PATH}"/deploy_kube.sh >> "$TARGET_FILE"
66 # finishing touches to the script
67 cat >> "$TARGET_FILE" <<EOF
72 # Installer script ends here
73 # The rest of this file is a binary payload
74 # ! DO NOT MODIFY IT !
80 # appending the tar to the script
82 tar -h --exclude='.git' --exclude='*.swp' --exclude='selfinstall_onap_*.sh' --exclude='ansible' --exclude='docker' --exclude='local_repo.conf' --exclude='live' -cvf - * >> "$TARGET_FILE"
85 chmod 755 "$TARGET_FILE"
86 message info "Created Nexus self installation file: $TARGET_FILE"