From 801567c0b7b77aba84ac6cde5f4fbd3e98e2403f Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Thu, 11 Aug 2022 23:13:38 +0800 Subject: [PATCH] Move gittip to share/rizin (#2907) --- librz/util/version.c | 7 ++++++- meson.build | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/librz/util/version.c b/librz/util/version.c index 989f48ba09..4dc3993626 100644 --- a/librz/util/version.c +++ b/librz/util/version.c @@ -20,7 +20,12 @@ * \return The saved git commit hash as a string, or NULL if it's not available. */ RZ_API RZ_OWN char *rz_version_gittip() { - char *gittip_pathname = rz_str_newf("%s" RZ_SYS_DIR "gittip", rz_path_bindir()); + char *datadir = rz_path_system(RZ_DATADIR); + if (!datadir) { + return NULL; + } + char *gittip_pathname = rz_file_path_join(datadir, "gittip"); + free(datadir); if (!gittip_pathname) { return NULL; } diff --git a/meson.build b/meson.build index f3b61fde2a..f2db5b6b15 100644 --- a/meson.build +++ b/meson.build @@ -525,7 +525,7 @@ if git_exe.found() and fs.exists('.git') output: 'gittip', command: [py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD'], install: true, - install_dir: rizin_bindir + install_dir: rizin_datdir_rz ) endif