Skip to content

Commit bcd2240

Browse files
removed redundant switches
1 parent 0359782 commit bcd2240

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

CalibreImport/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
// Build Number
3030
// Revision
3131
//
32-
[assembly: AssemblyVersion("1.0.4.1")]
33-
[assembly: AssemblyFileVersion("1.0.4.1")]
32+
[assembly: AssemblyVersion("1.0.4.2")]
33+
[assembly: AssemblyFileVersion("1.0.4.2")]

CalibreImport/ReleaseFiles/Setup.ps1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
#>
99

1010
param (
11-
[switch]$Install,
1211
[switch]$i,
13-
[switch]$RestartExplorer,
1412
[switch]$re,
15-
[switch]$Uninstall,
1613
[switch]$u
1714
)
1815

@@ -125,38 +122,38 @@ if (-not $dllFile) {
125122

126123
$dllPath = $dllFile.FullName
127124

128-
if ($Install -or $i -or (-not $Uninstall -and -not $u -and -not $RestartExplorer -and -not $re)) {
125+
if ($i -or (-not $u -and -not $re)) {
129126
Register-Dll -dllPath $dllPath
130127
Check-DllRegistration -dllPath $dllPath
131128
Add-RegistryEntries
132-
if ($RestartExplorer -or $re) {
129+
if ($re) {
133130
Restart-Explorer
134131
} else {
135132
$response = Read-Host "Do you want to restart Explorer now? (y/n)"
136133
if ($response -eq "y") {
137134
Restart-Explorer
138135
}
139136
}
140-
} elseif ($Uninstall -or $u) {
137+
} elseif ($u) {
141138
Unregister-Dll -dllPath $dllPath
142139
Check-DllRegistration -dllPath $dllPath
143140
Remove-RegistryEntries
144-
if ($RestartExplorer -or $re) {
141+
if ($re) {
145142
Restart-Explorer
146143
} else {
147144
$response = Read-Host "Do you want to restart Explorer now? (y/n)"
148145
if ($response -eq "y") {
149146
Restart-Explorer
150147
}
151148
}
152-
} elseif ($RestartExplorer -or $re) {
149+
} elseif ($re) {
153150
Restart-Explorer
154151
} else {
155152
# No need to specify an argument message, default to Install
156153
Register-Dll -dllPath $dllPath
157154
Check-DllRegistration -dllPath $dllPath
158155
Add-RegistryEntries
159-
if ($RestartExplorer -or $re) {
156+
if ($re) {
160157
Restart-Explorer
161158
} else {
162159
$response = Read-Host "Do you want to restart Explorer now? (y/n)"

0 commit comments

Comments
 (0)