2
0

install-linux.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/bash
  2. #
  3. # Copyright (c) Contributors to the Open 3D Engine Project.
  4. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. #
  6. # SPDX-License-Identifier: Apache-2.0 OR MIT
  7. #
  8. # Install from the build folder
  9. TARGET_BUILD_FOLDER=$1
  10. if [ "${TARGET_BUILD_FOLDER}" == "" ]
  11. then
  12. echo "Missing the target build folder name to create the installation base from"
  13. exit 1
  14. elif [ ${TARGET_BUILD_FOLDER} == "src" ]
  15. then
  16. echo "The target build folder cannot be 'src'"
  17. exit 1
  18. fi
  19. SRC_PATH=${TEMP_FOLDER}/src
  20. BLD_PATH=${TEMP_FOLDER}/${TARGET_BUILD_FOLDER}
  21. echo "BUILD FOLDER=${BLD_PATH}"
  22. echo "TARGET_INSTALL_ROOT=${TARGET_INSTALL_ROOT}"
  23. copy_folder_to_target() {
  24. local FOLDER=$1
  25. echo cp -rf ${BLD_PATH}/${FOLDER} ${TARGET_INSTALL_ROOT}/
  26. cp -rf ${BLD_PATH}/${FOLDER} ${TARGET_INSTALL_ROOT}/
  27. if [ $? -ne 0 ]
  28. then
  29. echo "Error copying the ${FOLDER} folder ${BLD_PATH}/${FOLDER} to ${TARGET_INSTALL_ROOT}/${FOLDER}"
  30. exit 1
  31. fi
  32. }
  33. rm -rf ${TARGET_INSTALL_ROOT}
  34. mkdir -p ${TARGET_INSTALL_ROOT}
  35. # Copy the license file
  36. echo "Copying LICENSE to ${TARGET_INSTALL_ROOT}"
  37. cp -f ${SRC_PATH}/LICENSE ${TARGET_INSTALL_ROOT}/
  38. if [ $? -ne 0 ]
  39. then
  40. echo "Copying LICENSE to ${TARGET_INSTALL_ROOT} failed."
  41. exit 1
  42. fi
  43. # Copy the include folder
  44. copy_folder_to_target include
  45. # Copy the bin folder
  46. copy_folder_to_target bin
  47. # Copy the lib folder
  48. copy_folder_to_target lib
  49. echo "Custom Install for OpenSSL finished successfully"
  50. exit 0