10-prepare-destination.install.sh 824 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. # shellcheck source=packaging/makeself/functions.sh
  4. . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
  5. # shellcheck disable=SC2015
  6. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true
  7. [ -d "${NETDATA_INSTALL_PATH}.old" ] && run rm -rf "${NETDATA_INSTALL_PATH}.old"
  8. [ -d "${NETDATA_INSTALL_PATH}" ] && run mv -f "${NETDATA_INSTALL_PATH}" "${NETDATA_INSTALL_PATH}.old"
  9. run mkdir -p "${NETDATA_INSTALL_PATH}/bin"
  10. run mkdir -p "${NETDATA_INSTALL_PATH}/usr"
  11. run cd "${NETDATA_INSTALL_PATH}" || exit 1
  12. run ln -s bin sbin
  13. run cd "${NETDATA_INSTALL_PATH}/usr" || exit 1
  14. run ln -s ../bin bin
  15. run ln -s ../sbin sbin
  16. run ln -s . local
  17. # shellcheck disable=SC2015
  18. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true