1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-09-23 19:08:25 +02:00
upscayl/update_upscayl_ncnn_binaries.sh
2023-10-21 19:13:03 +05:30

19 lines
796 B
Bash

#!/bin/bash
# Step 1: Download all the zip files from the GitHub releases page
curl -s https://api.github.com/repos/upscayl/upscayl-ncnn/releases/latest | grep "realesrgan-ncnn-vulkan" | cut -d : -f 2,3 | tr -d \" | wget -qi - > /dev/null 2>&1
# Get the latest version number
VERSION=curl -s https://api.github.com/repos/upscayl/upscayl-ncnn/releases/latest | jq -r ".tag_name"
echo "Latest version: $VERSION"
# Step 2: Extract the required zip files to their respective directories
unzip -j ./realesrgan-ncnn-vulkan-$VERSION-ubuntu.zip -d resources/linux/bin
# unzip realesrgan-ncnn-vulkan-$VERSION-macos.zip -d resources/macos/bin
# unzip realesrgan-ncnn-vulkan-$VERSION-windows.zip -d resources/windows/bin
# Step 4: Clean up the zip files
# rm *.zip
echo "Script executed successfully."