-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathload.sh
32 lines (25 loc) · 1.21 KB
/
load.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env sh
#############################################################
# #
# Privex's Shell Core #
# Cross-platform / Cross-shell helper functions #
# #
# Released under the GNU GPLv3 #
# #
# Official Repo: github.com/Privex/shell-core #
# #
#############################################################
######
# Directory where the script is located, so we can source files regardless of where PWD is
######
! [ -z ${ZSH_VERSION+x} ] && _SDIR=${(%):-%N} || _SDIR="${BASH_SOURCE[0]}"
DIR="$( cd "$( dirname "${_SDIR}" )" && pwd )"
source "${DIR}/init.sh"
ident_shell >/dev/null
if [ -z ${SG_LOAD_LIBS+x} ]; then
SG_LOAD_LIBS=(gnusafe helpers datehelpers)
_debug "SG_LOAD_LIBS not specified from environment. Using default libs: ${SG_LOAD_LIBS[*]}"
else
_debug "SG_LOAD_LIBS was specified in environment. Using environment libs: ${SG_LOAD_LIBS[*]}"
fi
sg_load_lib "${SG_LOAD_LIBS[@]}"