mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-30 04:41:49 +00:00
fba726e555
Summary: After make install, I see a directory hierarchy that looks like ``` ./usr ./usr/include ./usr/include/rocksdb ./usr/include/rocksdb/filter_policy.h [..] ./usr/include/rocksdb/iterator.h ./usr/include/rocksdb/utilities ./usr/include/rocksdb/utilities/ldb_cmd_execute_result.h ./usr/include/rocksdb/utilities/lua ./usr/include/rocksdb/utilities/lua/rocks_lua_custom_library.h ./usr/include/rocksdb/utilities/lua/rocks_lua_util.h ./usr/include/rocksdb/utilities/lua/rocks_lua_compaction_filter.h ./usr/include/rocksdb/utilities/backupable_db.h [..] ./usr/include/rocksdb/utilities/env_registry.h [..] ./usr/include/rocksdb/env.h ./usr/lib64 ./usr/lib64/librocksdb.so.5 ./usr/lib64/librocksdb.so.5.0.0 ./usr/lib64/librocksdb.so ./usr/lib64/librocksdb.a ``` Closes https://github.com/facebook/rocksdb/pull/1798 Differential Revision: D4456536 Pulled By: yiwu-arbug fbshipit-source-id: 5494e91
23 lines
687 B
Bash
Executable file
23 lines
687 B
Bash
Executable file
#!/bin/sh
|
|
if [ "$#" = "0" ]; then
|
|
echo "Usage: $0 major|minor|patch|full"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$1" = "major" ]; then
|
|
cat include/rocksdb/version.h | grep MAJOR | head -n1 | awk '{print $3}'
|
|
fi
|
|
if [ "$1" = "minor" ]; then
|
|
cat include/rocksdb/version.h | grep MINOR | head -n1 | awk '{print $3}'
|
|
fi
|
|
if [ "$1" = "patch" ]; then
|
|
cat include/rocksdb/version.h | grep PATCH | head -n1 | awk '{print $3}'
|
|
fi
|
|
if [ "$1" = "full" ]; then
|
|
awk '/#define ROCKSDB/ { env[$2] = $3 }
|
|
END { printf "%s.%s.%s\n", env["ROCKSDB_MAJOR"],
|
|
env["ROCKSDB_MINOR"],
|
|
env["ROCKSDB_PATCH"] }' \
|
|
include/rocksdb/version.h
|
|
fi
|