OSDN Git Service

luci-app-unblockneteasemusic: bump to 2.13
[immortalwrt/luci.git] / applications / luci-app-unblockneteasemusic / root / usr / bin / unm-debug
1 #!/bin/sh
2 # Copyright (C) 2021-2022 Tianling Shen <cnsztl@immortalwrt.org>
3
4 command -v "curl" >"/dev/null" || { echo -e "curl is not found."; exit 1; }
5
6 mkdir -p "/tmp"
7 /usr/share/unblockneteasemusic/debugging.sh 2>&1 | tee "/tmp/unm-debugging-output.txt"
8
9 catbox_link="$(curl -fsS -F "reqtype=fileupload" -F "time=72h" -F "fileToUpload=@/tmp/unm-debugging-output.txt" "https://litterbox.catbox.moe/resources/internals/api.php")"
10 transfer_link="$(curl -fsS --upload-file "/tmp/unm-debugging-output.txt" "https://transfer.sh/unm-debugging-output.txt")"
11 echo -e "\n"
12 echo -e "Log is available at:"
13 echo -e "$catbox_link"
14 echo -e "$transfer_link"
15
16 rm -f "/tmp/unm-debugging-output.txt"