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