Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit e22b4ac

Browse files
committed
new: download latest release version only
1 parent 8d9573a commit e22b4ac

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

common/download_install.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ GITHUB_BRANCH_OR_TAG=main
1313
if [ ! -d "/opt/$GITHUB_REPOSITORY" ];then
1414
apt update
1515
apt upgrade -y
16-
apt install -y git
17-
git clone https://github.com/$GITHUB_USER/$GITHUB_REPOSITORY/ /opt/$GITHUB_REPOSITORY
16+
apt install -y wget python3-pip
17+
pip3 install lastversion
18+
mkdir -p /opt/$GITHUB_REPOSITORY
19+
LAST_CONFIG_VERSION=$(lastversion $GITHUB_USER/$GITHUB_REPOSITORY)
20+
wget -c $(lastversion $GITHUB_USER/$GITHUB_REPOSITORY --source)
21+
tar xvzf $GITHUB_REPOSITORY-v$LAST_CONFIG_VERSION.tar.gz --strip-components=1 --directory /opt/$GITHUB_REPOSITORY
22+
rm $GITHUB_REPOSITORY-v$LAST_CONFIG_VERSION.tar.gz
1823
cd /opt/$GITHUB_REPOSITORY
19-
git checkout $GITHUB_BRANCH_OR_TAG
24+
bash install.sh
25+
exit 0
2026
fi
2127

2228
cd /opt/$GITHUB_REPOSITORY
23-
bash install.sh
29+
bash menu.sh

0 commit comments

Comments
 (0)