Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 50d2e2d

Browse files
committed
Initial script to replace tokens in Elixir.iss with values
1 parent 9e737bb commit 50d2e2d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

script-from-template.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$cd = (split-path $MyInvocation.MyCommand.Path -parent)
2+
3+
$elixirVersion = $args[0]
4+
$elixirURL = $args[1]
5+
6+
$newScriptPath = $cd + "\elixir-v" + $elixirVersion + "-setup.iss"
7+
$newScript = [System.IO.StreamWriter] $newScriptPath
8+
foreach ($line in (Get-Content .\Elixir.iss)) {
9+
$line = $line.Replace("@@VERSION", $elixirVersion)
10+
$line = $line.Replace("@@URL", $elixirURL)
11+
$newScript.WriteLine($line)
12+
}
13+
$newScript.close()
14+
& 'C:\Program Files (x86)\Inno Setup 5\Compil32.exe' /cc $newScriptPath

0 commit comments

Comments
 (0)