OK, I am working on an all purpose DNR for TS/LSIf it is on a TS server & I send out a new jar file I want to run build.sh (or .bat) if it is a prod server I want to restart LS. Unix and DOS.So my first issue is that I do not want to hard code the OD library path. I tried setting $OD_HOME and usinguse lib $OD_HOME."/solutions/perl";But that did not work (INC was /solutions/perl)The other thing is how can I tell if this is running on a TS server ? There is not an ENV set like IWOD60HOME on DOS. Maybe try to load TeamSite::Config in a block and if it errors ? Other ideas ?
...BEGIN { my $odhome = getodhome(); # routine for determining ODHOME regardless of platform eval(qq(use lib "$odhome/solutions/perl"));};...
/etc/defaultiwhome
Y:/default/main
TeamSite::Config
I use a smart shebang line to help between Unix/DOS. I know it may not work all times, but it is a start. I thought what I was trying was a pipe dream, but I truly do want this as portable as possible. I know it won't be perfect but I am going to make it as easy to transport as possible.Andy
IMHO, your best bet is going to be to have a properties/config file for your DnR. There are just too many things that could get out of sync. Alternatively, you could enforce (and assume) a consistent installation process across all of your environments (i.e. if it is unix then iw-home is /opt/Interwoven/TeamSite and if it is Windows C:\Interwoven\TeamSite).
I also pondered the idea of verifying this information through some sort of a service or something. In that case you still have dependency on service name, port, etc. -- which could change (at least in theory) from one server to another.
Config/properties file or consistency is probably going to be your friend here :-)
And since you go to maybe twice the number of clients (OK, probably more than twice) that I do, how would you feel about banking on your old buddy Mr. Consistency ?