diff --git a/bpkg.sh b/bpkg.sh index ecc166b..f9d5136 100755 --- a/bpkg.sh +++ b/bpkg.sh @@ -1,6 +1,13 @@ #!/bin/bash -VERSION="0.1.0" +## prevent sourcing +if [[ ${BASH_SOURCE[0]} != $0 ]]; then + echo >&2 "error: \`bpkg' cannot be sourced" + return 1 +fi + +## bpkg version +VERSION="0.2.0" ## output error to stderr error () { @@ -106,10 +113,5 @@ bpkg () { return 1 } -## export or run -if [[ ${BASH_SOURCE[0]} != $0 ]]; then - export -f bpkg -else - bpkg "${@}" - exit $? -fi +bpkg "${@}" +exit $? diff --git a/package.json b/package.json index bc495f3..609b932 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bpkg", - "version": "0.1.0", + "version": "0.2.0", "description": "Lightweight bash package manager", "global": true, "install": "make install"