mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-27 16:58:27 +00:00
Enable sourcing script on commandline
This commit is contained in:
parent
19f47f244b
commit
55e0e9fa16
@ -3346,7 +3346,7 @@ main(){
|
|||||||
|
|
||||||
# Only execute main function if script is not being sourced
|
# Only execute main function if script is not being sourced
|
||||||
# by another script
|
# by another script
|
||||||
if [[ "$(caller)" =~ ^0 ]]; then
|
if [[ "$0" = "${BASH_SOURCE[0]}" || -z "${BASH_SOURCE}" ]]; then
|
||||||
main "$@"
|
main "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user