Fix update notice for versioned releases
Some checks failed
Release App / release-app (push) Has been cancelled
Some checks failed
Release App / release-app (push) Has been cancelled
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
|
||||
echo "usage: $0 <tdlib-root> [output-tar.gz]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tdlib_root="$(realpath "$1")"
|
||||
output_path="${2:-tdlib-linux-x86_64.tar.gz}"
|
||||
output_path="$(realpath -m "$output_path")"
|
||||
|
||||
include_dir="$tdlib_root/include"
|
||||
lib_dir="$tdlib_root/lib"
|
||||
|
||||
if [ ! -f "$include_dir/td/telegram/td_json_client.h" ]; then
|
||||
echo "missing TDLib header: $include_dir/td/telegram/td_json_client.h" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! compgen -G "$lib_dir/libtdjson.so*" >/dev/null; then
|
||||
echo "missing TDLib shared library under: $lib_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
workdir="$(mktemp -d)"
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
|
||||
mkdir -p "$workdir/tdlib"
|
||||
cp -a "$include_dir" "$workdir/tdlib/include"
|
||||
cp -a "$lib_dir" "$workdir/tdlib/lib"
|
||||
|
||||
tar -C "$workdir" -czf "$output_path" tdlib
|
||||
sha256sum "$output_path" > "${output_path}.sha256"
|
||||
|
||||
echo "wrote $output_path"
|
||||
echo "wrote ${output_path}.sha256"
|
||||
Reference in New Issue
Block a user