K.S. Bhaskar on 18 Apr 2019 14:28:17 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Determining when a shell script is sourced


We have a shell script (starts with #!/binsh and is at https://gitlab.com/YottaDB/DB/YDB/blob/master/sr_unix/ydbinstall.sh) that should preferably not be source'd. Is there a way to test within the script whether someone has source'd it and generate an error without terminating the shell session that source'd it? Thank you very much.

Regards
– Bhaskar
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug