diff --git a/package.json b/package.json new file mode 100644 index 0000000..9f28bba --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "semver_bash", + "version": "0.0.1", + "description": "Semantic Versioning in Bash", + "install": "cp semver.sh ${PREFIX:-/usr/local}/bin/semver", + "scripts": [ "semver.sh" ] +} + diff --git a/semver.sh b/semver.sh index e5237a4..856af75 100755 --- a/semver.sh +++ b/semver.sh @@ -105,7 +105,7 @@ function semverGT() { fi } -if [ "___semver.sh" == "___`basename $0`" ]; then +if [[ ${BASH_SOURCE[0]} == $0 ]]; then MAJOR=0 MINOR=0