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:
parent
befbcbed46
commit
034581a9bd
18
bpkg.sh
18
bpkg.sh
@ -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
|
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user