@@ -0,0 +1,8 @@
+#!/bin/bash
+current_version=`/opt/alist/alist version | grep 'Version: v' | cut -d ' ' -f 2`
+latest_version=`curl -s https://api.github.com/repos/alist-org/alist/releases/latest | grep 'tag_name' | cut -d '"' -f 4`
+if [ "$current_version" != "$latest_version" ]; then
+ curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update
+else
+ echo "Up-to-date"
+fi
@@ -1,7 +1,7 @@
#!/bin/bash
export DATABASE_URL=""
./miniflux -flush-sessions
-wget `curl -s https://api.github.com/repos/miniflux/v2/releases | grep 'browser_download_url.*miniflux-linux-amd64' | head -n 1 | cut -d '"' -f 4`
+wget `curl -s https://api.github.com/repos/miniflux/v2/releases/latest | grep 'browser_download_url.*miniflux-linux-amd64' | cut -d '"' -f 4`
mv miniflux-linux-amd64 miniflux
chmod +x miniflux
-./miniflux -migrate
+./miniflux -migrate