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
|
||||
|
||||
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 $?
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bpkg",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "Lightweight bash package manager",
|
||||
"global": true,
|
||||
"install": "make install"
|
||||
|
Loading…
Reference in New Issue
Block a user