2
0
mirror of https://github.com/bpkg/bpkg synced 2024-11-08 01:10:36 +00:00

prevent sourcing bpkg and bump minor

This commit is contained in:
Joseph Werle 2014-05-29 12:45:24 -04:00
parent befbcbed46
commit 034581a9bd
2 changed files with 11 additions and 9 deletions

18
bpkg.sh
View File

@ -1,6 +1,13 @@
#!/bin/bash #!/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 ## output error to stderr
error () { error () {
@ -106,10 +113,5 @@ bpkg () {
return 1 return 1
} }
## export or run bpkg "${@}"
if [[ ${BASH_SOURCE[0]} != $0 ]]; then exit $?
export -f bpkg
else
bpkg "${@}"
exit $?
fi

View File

@ -1,6 +1,6 @@
{ {
"name": "bpkg", "name": "bpkg",
"version": "0.1.0", "version": "0.2.0",
"description": "Lightweight bash package manager", "description": "Lightweight bash package manager",
"global": true, "global": true,
"install": "make install" "install": "make install"