update rsync usage as well
This commit is contained in:
parent
4ea01c4c42
commit
78942427c6
|
@ -72,11 +72,11 @@ if [ -n "${NODEJS_VER}" ]; then
|
|||
rm -rf ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH} # clean up the temporary unzip folder
|
||||
rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md}
|
||||
if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
|
||||
echo $sudo_cmd rsync -a "${NODEJS_UNTAR}/" "$node_install_path/"
|
||||
rsync -a "${NODEJS_UNTAR}/" "$node_install_path/" || $sudo_cmd rsync -a "${NODEJS_UNTAR}/" "$node_install_path/"
|
||||
echo $sudo_cmd rsync -r "${NODEJS_UNTAR}/*" "$node_install_path/"
|
||||
rsync -r "${NODEJS_UNTAR}/*" "$node_install_path/" || $sudo_cmd rsync -r "${NODEJS_UNTAR}/*" "$node_install_path/"
|
||||
else
|
||||
echo $sudo_cmd cp -a "${NODEJS_UNTAR}/*" "$node_install_path/"
|
||||
cp -a "${NODEJS_UNTAR}"/* "$node_install_path/" || $sudo_cmd cp -a "${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/"
|
||||
fi
|
||||
rm -rf "${NODEJS_UNTAR}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue