PrivateBin: Fix cmd to get current_version

This commit is contained in:
gardouille 2024-10-30 17:52:15 +01:00
parent 33825e2862
commit d5f1bdb67a
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

View File

@ -42,7 +42,7 @@ DEBUG=0
script_wd=$(dirname "${0}") script_wd=$(dirname "${0}")
pb_install_dir="${1}" pb_install_dir="${1}"
pb_current_version=$(cd "${pb_install_dir}" || exit 1 ; awk '/@version/ { print $3 }' lib/Configuration.php || exit 1 ; cd - > /dev/null || exit 1) pb_current_version=$(cd "${pb_install_dir}" || exit 1 ; awk 'BEGIN { FS = "'\''" } ; /const VERSION/ { print $2 }' lib/Controller.php || exit 1 ; cd - > /dev/null || exit 1)
pb_repo_url="https://github.com/PrivateBin/PrivateBin" pb_repo_url="https://github.com/PrivateBin/PrivateBin"
pb_new_version=$("${script_wd}"/releasetags "${pb_repo_url}" | head -n1 | sed 's/v//') pb_new_version=$("${script_wd}"/releasetags "${pb_repo_url}" | head -n1 | sed 's/v//')