Skip to content

Commit 5037839

Browse files
committed
fixing installer scripts
1 parent 4c08b31 commit 5037839

4 files changed

Lines changed: 42 additions & 197 deletions

File tree

docs/website/web_assets/installers/asrfacet-rb-installer-linux.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ EOF
4747
}
4848

4949
required_paths_for_mode() {
50-
local paths=("install/linux.sh")
50+
local paths=("/install/linux.sh")
5151
case "$MODE" in
5252
install|update|test)
5353
paths+=(
54-
"bin"
55-
"config"
56-
"lib"
57-
"man"
58-
"wordlists"
59-
"docs/images"
60-
"Gemfile"
61-
"Gemfile.lock"
62-
"asrfacet-rb.gemspec"
63-
"README.md"
64-
"LICENSE"
54+
"/bin"
55+
"/config"
56+
"/lib"
57+
"/man"
58+
"/wordlists"
59+
"/docs/images"
60+
"/Gemfile"
61+
"/Gemfile.lock"
62+
"/asrfacet-rb.gemspec"
63+
"/README.md"
64+
"/LICENSE"
6565
)
66-
[ "$MODE" = "test" ] && paths+=("spec")
66+
[ "$MODE" = "test" ] && paths+=("/spec")
6767
;;
6868
esac
6969

docs/website/web_assets/installers/asrfacet-rb-installer-macos.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ EOF
4747
}
4848

4949
required_paths_for_mode() {
50-
local paths=("install/macos.sh")
50+
local paths=("/install/macos.sh")
5151
case "$MODE" in
5252
install|update|test)
5353
paths+=(
54-
"bin"
55-
"config"
56-
"lib"
57-
"man"
58-
"wordlists"
59-
"docs/images"
60-
"Gemfile"
61-
"Gemfile.lock"
62-
"asrfacet-rb.gemspec"
63-
"README.md"
64-
"LICENSE"
54+
"/bin"
55+
"/config"
56+
"/lib"
57+
"/man"
58+
"/wordlists"
59+
"/docs/images"
60+
"/Gemfile"
61+
"/Gemfile.lock"
62+
"/asrfacet-rb.gemspec"
63+
"/README.md"
64+
"/LICENSE"
6565
)
66-
[ "$MODE" = "test" ] && paths+=("spec")
66+
[ "$MODE" = "test" ] && paths+=("/spec")
6767
;;
6868
esac
6969

docs/website/web_assets/installers/asrfacet-rb-installer-windows.cmd

Lines changed: 0 additions & 156 deletions
This file was deleted.

docs/website/web_assets/installers/asrfacet-rb-installer-windows.ps1

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,24 @@ function Confirm-Requirements {
6868
function Get-RequiredPaths {
6969
param([string]$SelectedMode)
7070

71-
$paths = @("install/windows.ps1")
71+
$paths = @("/install/windows.ps1")
7272
if ($SelectedMode -in @("install", "update", "test")) {
7373
$paths += @(
74-
"bin",
75-
"config",
76-
"lib",
77-
"man",
78-
"wordlists",
79-
"docs/images",
80-
"Gemfile",
81-
"Gemfile.lock",
82-
"asrfacet-rb.gemspec",
83-
"README.md",
84-
"LICENSE"
74+
"/bin",
75+
"/config",
76+
"/lib",
77+
"/man",
78+
"/wordlists",
79+
"/docs/images",
80+
"/Gemfile",
81+
"/Gemfile.lock",
82+
"/asrfacet-rb.gemspec",
83+
"/README.md",
84+
"/LICENSE"
8585
)
8686

8787
if ($SelectedMode -eq "test") {
88-
$paths += "spec"
88+
$paths += "/spec"
8989
}
9090
}
9191

@@ -106,8 +106,9 @@ function Invoke-Step {
106106
}
107107

108108
function Get-TempWorkDir {
109-
$base = Join-Path $env:TEMP "asrfacet-rb-installer"
110-
$name = "run-{0}" -f ([Guid]::NewGuid().ToString("N"))
109+
$tempRoot = if ([string]::IsNullOrWhiteSpace($env:LOCALAPPDATA)) { $env:TEMP } else { Join-Path $env:LOCALAPPDATA "Temp" }
110+
$base = Join-Path $tempRoot "afrb"
111+
$name = "r-{0}" -f ([Guid]::NewGuid().ToString("N").Substring(0, 8))
111112
return Join-Path $base $name
112113
}
113114

0 commit comments

Comments
 (0)