25 lines
835 B
Bash
25 lines
835 B
Bash
|
echo "---"
|
||
|
echo "Скачивание бинарного файла..."
|
||
|
echo "---"
|
||
|
# Fetch the latest release information from the GitHub API
|
||
|
response=$(curl -s https://api.github.com/repos/hufrea/byedpi/releases/latest)
|
||
|
# Extract the release tag and the desired file name
|
||
|
release_tag=$(echo "$response" | grep -o '"tag_name": "[^"]*' | sed 's/"tag_name": "//')
|
||
|
file_name=$(echo "$response" | grep -o 'byedpi-[^"]*x86_64\.tar\.gz' | head -n 1)
|
||
|
# Construct the download link
|
||
|
download_link="https://github.com/hufrea/byedpi/releases/download/$release_tag/$file_name"
|
||
|
|
||
|
wget $download_link
|
||
|
|
||
|
echo "---"
|
||
|
echo "Создаём папку для сборки..."
|
||
|
echo "---"
|
||
|
mkdir build
|
||
|
|
||
|
echo "---"
|
||
|
echo "Распаковываем и достаём файлы..."
|
||
|
echo "---"
|
||
|
tar -xvf *.tar.gz
|
||
|
chmod +x "ciadpi-x86_64"
|
||
|
mv "ciadpi-x86_64" build/
|