summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kazantsev2021-12-08 20:27:35 +0500
committerfraggod@malediction2021-12-08 20:27:35 +0500
commitb5304dc37937d51a679066a55bbea837d47967a2 (patch)
tree1d1081731ed3d93178d7495eb3ac48c057c88c41
parentd44e0fb2e4bf390cbbdb5c8445483e0bea4b6be4 (diff)
downloadaur-b5304dc37937d51a679066a55bbea837d47967a2.tar.gz
Check parsed version, reword WARNING about api_id to be less dire
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2bfaee118e0c..6a439cf133ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,6 +16,7 @@ sha256sums=(SKIP)
pkgver() {
cd $pkgname
ver=$(awk '/^\s*set\(VERSION / {sub(")","",$2); print $2}' CMakeLists.txt)
+ [[ -n "$ver" ]] || { echo >&2 "ERROR: Failed to parse version from CMakeLists.txt"; exit 1; }
printf "%s.r%s.%s" "$ver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
@@ -30,7 +31,7 @@ build() {
else
echo >&2 "WARNING: --------------------"
echo >&2 "WARNING: tdlib-purple will be built with default/testing API_ID and API_HASH credentials."
- echo >&2 "WARNING: This will likely cause 400 (API_ID_PUBLISHED_FLOOD) error on login when using it."
+ echo >&2 "WARNING: This can cause 400 (API_ID_PUBLISHED_FLOOD) error on login when using it."
echo >&2 "WARNING: Set/export TD_API_ID and TD_API_HASH env vars to use custom (working) values there."
echo >&2 "WARNING: Check https://core.telegram.org/api/obtaining_api_id URL for how to easily get those."
echo >&2 "WARNING: --------------------"