I am trying to refer relative path to file which is in the same repo as powershell script.
I have following dir structure.
│ └── scripts.sh
Ok, so in v3 or higher this is simple. If you want the path to the "Repo" folder you could simply refer to the parent of the current folder such as:
$Repo = Resolve-Path "$PSScriptRoot\.."
This will get you the folder object of Repo. From there you could get to your script folder.
Or to directly refer to the
scripts.sh file you could do: