Closed coryarobbins closed 3 years ago
I am shocked that this script works without any other modifications besides the save paths. That is completely unintentional.
This is how we can check automatically. if ($IsWindows) { $savepath = "c:\scripts" } else if ($IsLinux) { $savepath = "/scripts" }
I'm not going to merge your changes. I will do some testing and then put it in the CognosDefaults-SAMPLE.ps1 using the above logic.
Yeah... It was a very happy surprise. I think you could change the if statement though. I haven't tested it on a Mac (I can if you would like), but it uses the same paths as Linux, so you could probably change the else if to a straight-up else.
Let me know if you want me to do anything else. I've already got the dependencies installed.
Thanks again for pointing this out. I can not believe this works. I added to the Readme the required dependencies for this and an example of save paths in the CognosDefaults.ps1.
I'm thinking that, like Charlie said, something along the lines of if $IsWindows = True would be the original paths, and = False would mean Mac or Linux, so should follow the unix file structure.