21 lines
394 B
Bash
21 lines
394 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if ! [ $A3_INCLUDE ]; then
|
||
|
A3_INCLUDE=1
|
||
|
A3_INCLUDED=""
|
||
|
A3_LIB_PATH=${A3_LIB_PATH:-/usr/lib/a3}
|
||
|
is_included() {
|
||
|
echo "$A3_INCLUDED" | grep -q "$1"
|
||
|
}
|
||
|
|
||
|
include() {
|
||
|
[ -z "$1" ] && return 0
|
||
|
is_included $1 && return 0
|
||
|
. $1
|
||
|
A3_INCLUDED="$A3_INCLUDED $1"
|
||
|
}
|
||
|
|
||
|
a3include_lib() {
|
||
|
include $A3_LIB_PATH/$1.sh
|
||
|
}
|
||
|
fi
|