Go to repository

Function ifUnix

Takes two scripts as a string and returns the first if the current environment is unix bases (Linux, MacOS, etc.), and the second if the current environment is not (windows systems)

Parameters

  • script: string

    the script to use for unix

  • altScript: string

    the script to use for windows

Returns string

The bash script, first if system is unix, second if windows.