From 190dfe19241207ac4dfe766f89f8b540404bc096 Mon Sep 17 00:00:00 2001 From: hyrulelinks <134026642+hyrulelinks@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:12:23 +0800 Subject: [PATCH] Update macos-build-script.sh --- macos-build-script.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/macos-build-script.sh b/macos-build-script.sh index a8d4cef..b11102d 100644 --- a/macos-build-script.sh +++ b/macos-build-script.sh @@ -1,5 +1,5 @@ # Ask user whether to use mirror_head -read -p "Do you want to use mirror_head? (y/n): " use_mirror +read -p "Do you want to use mirror site to clone repo? (y/n): " use_mirror if [ "$use_mirror" = "y" ]; then mirror_head="https://mirror.ghproxy.com/" else @@ -81,10 +81,11 @@ download_asset() { # Thin file and set permissions if [ -f "upscayl-bin" ]; then # Thin file - echo "INFO: 🚧 Thin fat files to single architecture..." arch=$(uname -m) echo "INFO: 💬 System architecture is $arch." - echo "INFO: 🚧 Extracting architecture specific libraries..." + echo "INFO: 🚧 Extracting architecture specific binary..." + target_file="upscayl-bin" + target_file_temp="upscayl-bin-temp" if [ "$arch" = "arm64" ]; then ditto --arch arm64 "$target_file" "$target_file_temp" else @@ -93,8 +94,8 @@ download_asset() { rm -rf "$target_file" mv "$target_file_temp" "$target_file" # Add execute permission - echo "INFO: 🚧 Add execute permission to realesrgan-ncnn-vulkan..." - chmod u+x realesrgan-ncnn-vulkan + echo "INFO: 🚧 Setting execute permission to $target_file..." + chmod u+x $target_file fi elif [ "$repo" = "nihui/realsr-ncnn-vulkan" ]; then # Rename RealSR models