2014-10-02 21:03:49 +00:00
|
|
|
#!/bin/sh
|
2014-10-04 09:17:06 +00:00
|
|
|
if [ "$#" = "0" ]; then
|
2014-10-02 18:59:22 +00:00
|
|
|
echo "Usage: $0 major|minor|patch"
|
2014-10-02 21:03:49 +00:00
|
|
|
exit 1
|
2014-10-02 18:59:22 +00:00
|
|
|
fi
|
2014-10-04 09:17:06 +00:00
|
|
|
if [ "$1" = "major" ]; then
|
2014-10-02 18:59:22 +00:00
|
|
|
cat include/rocksdb/version.h | grep MAJOR | head -n1 | awk '{print $3}'
|
|
|
|
fi
|
2014-10-04 09:17:06 +00:00
|
|
|
if [ "$1" = "minor" ]; then
|
2014-10-02 18:59:22 +00:00
|
|
|
cat include/rocksdb/version.h | grep MINOR | head -n1 | awk '{print $3}'
|
|
|
|
fi
|
2014-10-04 09:17:06 +00:00
|
|
|
if [ "$1" = "patch" ]; then
|
2014-10-02 18:59:22 +00:00
|
|
|
cat include/rocksdb/version.h | grep PATCH | head -n1 | awk '{print $3}'
|
|
|
|
fi
|