Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Jan 9, 2024
1 parent 427a3db commit 77e72e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions alist-lib/scripts/init_alist_core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TAG_NAME=$(curl -s https://api.github.com/repos/alist-org/alist/releases/latest | grep -o '"tag_name": ".*"' | cut -d'"' -f4)

URL="https://github.com/alist-org/alist/archive/refs/tags/${TAG_NAME}.tar.gz"
echo "Downloading alist ${TAG_NAME} from ${URL}"

curl -L -o "alist.tgz" $URL
tar xf "alist.tgz" --strip-components 1 -C ../

echo "Write version to local.properties"
cd ../../
touch local.properties
sed -i '/ALIST_VERSION/d' local.properties
echo "ALIST_VERSION=${TAG_NAME}" >> local.properties

0 comments on commit 77e72e0

Please sign in to comment.