Merge f657bdb86b47c19a36eb9db0a1718a27d57a522d into 4d38424e6cbb32d07c74d3b4d760af7afb35742d

This commit is contained in:
Michael C Tiernan - MIT 2025-03-20 17:54:19 +08:00 committed by GitHub
commit a651bb41ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ for tool in ${unzip_tools_list[*]}; do
unzip_tool="$tool"
break
fi
done
done
set -e
# exit if no unzip tools available
@ -78,7 +78,7 @@ case $OS in
;;
OpenBSD)
OS='openbsd'
;;
;;
Darwin)
OS='osx'
binTgtDir=/usr/local/bin
@ -161,7 +161,7 @@ case "$OS" in
#manual
if ! [ -x "$(command -v mandb)" ]; then
echo 'mandb not found. The rclone man docs will not be installed.'
else
else
mkdir -p /usr/local/share/man/man1
cp rclone.1 /usr/local/share/man/man1/
mandb
@ -178,16 +178,24 @@ case "$OS" in
makewhatis
;;
'osx')
### - - - - - - - - - - - - - - - - - - - -
#binary
mkdir -m 0555 -p ${binTgtDir}
cp rclone ${binTgtDir}/rclone.new
mv ${binTgtDir}/rclone.new ${binTgtDir}/rclone
chmod a=x ${binTgtDir}/rclone
sudo -v
sudo -u root -- bash -c "\
mkdir -m 0755 -p ${binTgtDir} && \
cp rclone ${binTgtDir}/rclone.new && \
mv ${binTgtDir}/rclone.new ${binTgtDir}/rclone && \
chmod a=x ${binTgtDir}/rclone && \
chown root:root ${binTgtDir}/rclone"
### - - - - - - - - - - - - - - - - - - - -
#manual
mkdir -m 0555 -p ${man1TgtDir}
cp rclone.1 ${man1TgtDir}
chmod a=r ${man1TgtDir}/rclone.1
sudo -v
sudo -u root -- bash -c "\
mkdir -m 0555 -p ${man1TgtDir} && \
cp rclone.1 ${man1TgtDir} && \
chmod a=r ${man1TgtDir}/rclone.1"
;;
### - - - - - - - - - - - - - - - - - - - -
*)
echo 'OS not supported'
exit 2