#!/usr/bin/env bash set -e # shellcheck disable=SC1090 source "${XDG_DATA_HOME}/buddy-up/includes/node.sh" DEST="${XDG_DATA_HOME}/apps/releases/node" CURRENT="${DEST}/current" extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1" set_current_link "${DEST}" "${VERSION}" APPS=$(find "${CURRENT}"/bin -not -type d -exec basename {} ';') for app in ${APPS}; do set_symlink "${CURRENT}/bin/${app}" "${XDG_BIN_HOME}/${app}" done set_symlink "${CURRENT}/include/node" "${XDG_INCLUDE_HOME}/node" set_symlink "${CURRENT}/share/doc/node" "${XDG_DATA_HOME}/doc/node" set_symlink "${CURRENT}/share/man/man1/node.1" "${MAN_DIR}/node.1" set_symlink "${CURRENT}/share/systemtap/tapset/node.stp" "${XDG_DATA_HOME}/systemtap/tapset/node.stp"