For 'Mac OSX' Force ownership and modes on file using sudo.

Avoid assuming certain things.
	Forcing creation of target dir with correct mode and ownership.
	Move files into place setting their modes too.
	These tasks done the same for binary and manpages.
This commit is contained in:
Michael C Tiernan - MIT-Research Computing Project 2022-05-19 07:51:15 -04:00
parent dd0075735d
commit 1f114d504b

View file

@ -175,20 +175,19 @@ case "$OS" in
### - - - - - - - - - - - - - - - - - - - - ### - - - - - - - - - - - - - - - - - - - -
#binary #binary
sudo -v sudo -v
sudo -s -- <<-EOT sudo -u root -- bash -c "\
mkdir -m 0555 -p ${binTgtDir} mkdir -m 0755 -p ${binTgtDir} && \
cp rclone ${binTgtDir}/rclone.new cp rclone ${binTgtDir}/rclone.new && \
mv ${binTgtDir}/rclone.new ${binTgtDir}/rclone mv ${binTgtDir}/rclone.new ${binTgtDir}/rclone && \
chmod a=x ${binTgtDir}/rclone chmod a=x ${binTgtDir}/rclone && \
EOT chown root:root ${binTgtDir}/rclone"
### - - - - - - - - - - - - - - - - - - - - ### - - - - - - - - - - - - - - - - - - - -
#manual #manual
sudo -v sudo -v
sudo -s -- <<-EOT sudo -u root -- bash -c "\
mkdir -m 0555 -p ${man1TgtDir} mkdir -m 0555 -p ${man1TgtDir} && \
cp rclone.1 ${man1TgtDir} cp rclone.1 ${man1TgtDir} && \
chmod a=r ${man1TgtDir}/rclone.1 chmod a=r ${man1TgtDir}/rclone.1"
EOT
;; ;;
### - - - - - - - - - - - - - - - - - - - - ### - - - - - - - - - - - - - - - - - - - -
*) *)