Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Linuxインストーラーでインストールするバージョンが0.15以上のときlibsndfileのチェックをスキップする #1613

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 32 additions & 28 deletions build/installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,43 @@ EOS
fi
echo "[-] 7z command: ${COMMAND_7Z}"

echo "[+] Checking runtime prerequisites..."
LATEST_RELEASE_URL=$REPO_URL/releases/latest

PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin
if ! command -v ldconfig &> /dev/null; then
cat << EOS && exit 1
if [ -z "${VERSION}" ]; then
echo "[+] Checking the latest version..."

# releases/tag/{version}
RELEASE_TAG_URL=$(curl -fsSL -o /dev/null -w '%{url_effective}' "${LATEST_RELEASE_URL}")

# extract version (release tag name) from URL
VERSION=$(echo "${RELEASE_TAG_URL}" | sed 's/.*\/\(.*\)$/\1/')
echo "[-] Install version: ${VERSION} (latest)"
else
echo "[-] Install version: ${VERSION}"
fi

IFS=" " read -r -a VERSION_ARRAY <<< "${VERSION//[.+-]/ }"
if [ "${VERSION_ARRAY[0]}" -eq 0 ] && [ "${VERSION_ARRAY[1]}" -le 14 ]; then
# Check when version < 0.15
echo "[+] Checking runtime prerequisites..."

PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin
if ! command -v ldconfig &> /dev/null; then
cat << EOS && exit 1
[!] Command 'ldconfig' not found

Required to check existence of required libraries.
You must add a directory of contain ldconfig command to PATH environment variable.

EOS
fi
fi

if { ldconfig -p | grep 'libsndfile\.so';} &>/dev/null; then
echo "[-] libsndfile: OK"
elif [ -d /usr/local/Cellar/libsndfile ]; then
echo "[-] libsndfile: OK"
else
cat << 'EOS'
if { ldconfig -p | grep 'libsndfile\.so';} &>/dev/null; then
echo "[-] libsndfile: OK"
elif [ -d /usr/local/Cellar/libsndfile ]; then
echo "[-] libsndfile: OK"
else
cat << 'EOS'
[!] libsndfile: not found

Required to run VOICEVOX ENGINE
Expand All @@ -160,26 +178,12 @@ Arch Linux
MacOS:
brew install libsndfile
EOS
if [ "${IGNORE_RTCOND}" != "1" ]; then
exit 1
if [ "${IGNORE_RTCOND}" != "1" ]; then
exit 1
fi
fi
fi

LATEST_RELEASE_URL=$REPO_URL/releases/latest

if [ -z "${VERSION}" ]; then
echo "[+] Checking the latest version..."

# releases/tag/{version}
RELEASE_TAG_URL=$(curl -fsSL -o /dev/null -w '%{url_effective}' "${LATEST_RELEASE_URL}")

# extract version (release tag name) from URL
VERSION=$(echo "${RELEASE_TAG_URL}" | sed 's/.*\/\(.*\)$/\1/')
echo "[-] Install version: ${VERSION} (latest)"
else
echo "[-] Install version: ${VERSION}"
fi

RELEASE_URL=${REPO_URL}/releases/download/${VERSION}
ARCHIVE_LIST_URL=${RELEASE_URL}/${NAME}.7z.txt

Expand Down
Loading