#!/usr/bin/env bash # shellcheck disable=SC1090 source "${XDG_DATA_HOME}/buddy-up/includes/node.sh" PREFIX=${PREFIX:-/usr/local} DEST="${PREFIX}/apps/releases/node" CURRENT="${DEST}/current" extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1" "sudo" set_current_link "${DEST}" "${VERSION}" "sudo" for app in "${CURRENT}"/bin/*; do set_symlink "${CURRENT}/bin/${app}" "${XDG_BIN_HOME}/${app}" sudo done set_symlink "${CURRENT}/include/node" "${PREFIX}/include/node" sudo set_symlink "${CURRENT}/share/doc/node" "${CURRENT}/share/doc/node" sudo set_symlink "${CURRENT}/share/man/man1/node.1" "${CURRENT}/share/man/man1/node.1" sudo set_symlink "${CURRENT}/share/systemtap/tapset/node.stp" "${CURRENT}/share/systemtap/tapset/node.stp" sudo