mirror of
https://github.com/StackExchange/blackbox.git
synced 2025-12-15 19:13:01 +02:00
Always setting BLACKBOX_HOME
This makes the beginning of all files the same and a little simpler.
`${0%/*}` turns "/home/user/repository/bin/blackbox_edit" into
"/home/user/repository/bin", exactly like basename but without eating a
process.
Because other scripts needed `$blackbox_home` I made this into a
standardard variable that's always available.
This also loads _stack_lib.sh always because _blackbox_common.sh
requires it.
This commit is contained in:
@@ -7,7 +7,13 @@
|
||||
# Usage:
|
||||
#
|
||||
# set -e
|
||||
# . _blackbox_common.sh
|
||||
# source "${0%/*}/_blackbox_common.sh"
|
||||
|
||||
# Load additional useful functions
|
||||
source "${0%/*}"/_stack_lib.sh
|
||||
|
||||
# Where are we?
|
||||
: "${BLACKBOX_HOME:=$(cd "${0%/*}" ; pwd)}" ;
|
||||
|
||||
# Where in the VCS repo should the blackbox data be found?
|
||||
: "${BLACKBOXDATA:=keyrings/live}" ; # If BLACKBOXDATA not set, set it.
|
||||
|
||||
Reference in New Issue
Block a user