actually, just use cp, not rsync

This commit is contained in:
AJ ONeal 2018-07-26 21:26:30 +00:00
parent 6f016e8d68
commit cdab3cb1ef
1 changed files with 2 additions and 7 deletions

View File

@ -71,13 +71,8 @@ if [ -n "${NODEJS_VER}" ]; then
mv ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH}/* ${NODEJS_UNTAR}/ mv ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH}/* ${NODEJS_UNTAR}/
rm -rf ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH} # clean up the temporary unzip folder rm -rf ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH} # clean up the temporary unzip folder
rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md} rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md}
if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
echo $sudo_cmd rsync -rl "${NODEJS_UNTAR}"/* "$node_install_path/"
rsync -rl "${NODEJS_UNTAR}"/* "$node_install_path/" || $sudo_cmd rsync -rl "${NODEJS_UNTAR}"/* "$node_install_path/"
else
echo $sudo_cmd cp -PR "${NODEJS_UNTAR}/*" "$node_install_path/" echo $sudo_cmd cp -PR "${NODEJS_UNTAR}/*" "$node_install_path/"
cp -PR "${NODEJS_UNTAR}"/* "$node_install_path/" || $sudo_cmd cp -PR "${NODEJS_UNTAR}"/* "$node_install_path/" cp -PR "${NODEJS_UNTAR}"/* "$node_install_path/" || $sudo_cmd cp -PR "${NODEJS_UNTAR}"/* "$node_install_path/"
fi
rm -rf "${NODEJS_UNTAR}" rm -rf "${NODEJS_UNTAR}"
chown -R $(whoami) "$node_install_path/lib/node_modules/" || $sudo_cmd chown -R $(whoami) "$node_install_path/lib/node_modules/" chown -R $(whoami) "$node_install_path/lib/node_modules/" || $sudo_cmd chown -R $(whoami) "$node_install_path/lib/node_modules/"