From 4e34cbf9673aeaba252e01df554a0d204e83c5e2 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Wed, 8 Apr 2026 13:26:13 +0900 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/mpv/update-uosc.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 .config/mpv/update-uosc.sh (limited to '.config/mpv/update-uosc.sh') diff --git a/.config/mpv/update-uosc.sh b/.config/mpv/update-uosc.sh new file mode 100755 index 0000000..7334b58 --- /dev/null +++ b/.config/mpv/update-uosc.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +URI=" + https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip + https://github.com/tomasklaen/uosc/releases/latest/download/uosc.conf +" + +target="$(readlink -f -- "$(dirname "$0")")" +tmp=$(mktemp -d) +trap '{ rm -r $tmp; }' EXIT INT +cd "$tmp" || exit 1 + +for src in $URI; do + curl -sLO "$src" + { unzip -qd "$tmp"/ "$tmp"/*.zip 2>/dev/null && rm "$tmp"/*.zip; } || true + { tar -xf "$tmp"/*.tar* -C "$tmp"/ 2>/dev/null && rm "$tmp"/*.tar*; } || true +done + +rsync -ac "$tmp"/ "$target"/ -- cgit 1.4.1