Skip to content

Commit aaedd43

Browse files
committed
Remove redundant comments from installation scripts
- remove redundant commnets
1 parent 7b26f78 commit aaedd43

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

‎install.ps1‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$ErrorActionPreference = "Stop"
22
$targetScheme = if ($args.Count -gt 0) { $args[0] } else { $null }
33

4-
# Validate Node.js version and attempt to switch if necessary
54
$nodeIsGood = $false
65
if (Get-Command node -ErrorAction SilentlyContinue) {
76
$nodeVersion = (node -v) -replace '^v',''
@@ -17,15 +16,13 @@ if (!$nodeIsGood) {
1716

1817
$switched = $false
1918

20-
# Try fnm
2119
if (!$switched -and (Get-Command fnm -ErrorAction SilentlyContinue)) {
2220
fnm env --shell powershell | Out-String | Invoke-Expression
2321
fnm install 22 *>$null
2422
fnm use 22 *>$null
2523
$switched = $true
2624
}
2725

28-
# Try nvm
2926
if (!$switched -and (Get-Command nvm -ErrorAction SilentlyContinue)) {
3027
nvm install 22 *>$null
3128
nvm use 22 *>$null
@@ -39,7 +36,6 @@ if (!$nodeIsGood) {
3936
}
4037
}
4138

42-
# Detect available editors in the system
4339
$availableEditors = @()
4440
$editorCmds = @()
4541
$editorSchemes = @()
@@ -147,7 +143,6 @@ Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing
147143
Write-Host "Extracting archive..."
148144
Expand-Archive -Path $zipPath -DestinationPath $tmpDir -Force
149145

150-
# The extracted content is in a subfolder inside $tmpDir
151146
$extractedDir = Get-ChildItem -Path $tmpDir -Directory | Select-Object -First 1
152147

153148
if (!$extractedDir) {
@@ -201,5 +196,4 @@ if ($choice -eq 'a' -or $choice -eq 'A') {
201196

202197
Pause
203198
Pop-Location
204-
# Run cleanup in the background to avoid sluggish exit
205199
Start-Process -FilePath "cmd.exe" -ArgumentList "/c", "rmdir", "/s", "/q", "`"$tmpDir`"" -WindowStyle Hidden

‎install.sh‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if ! command -v unzip &> /dev/null; then
1111
exit 1
1212
fi
1313

14-
# Validate Node.js version and attempt to switch if necessary
1514
check_node_version() {
1615
if ! command -v node &> /dev/null; then return 1; fi
1716
local version
@@ -25,7 +24,6 @@ if ! check_node_version; then
2524

2625
SWITCHED=false
2726

28-
# Try nvm
2927
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
3028
if [ -s "$NVM_DIR/nvm.sh" ]; then
3129
\. "$NVM_DIR/nvm.sh"
@@ -34,13 +32,11 @@ if ! check_node_version; then
3432
nvm install 22 >/dev/null 2>&1 && nvm use 22 >/dev/null 2>&1 && SWITCHED=true
3533
fi
3634

37-
# Try fnm
3835
if [ "$SWITCHED" = false ] && command -v fnm &> /dev/null; then
3936
eval "$(fnm env)"
4037
fnm install 22 >/dev/null 2>&1 && fnm use 22 >/dev/null 2>&1 && SWITCHED=true
4138
fi
4239

43-
# Try n
4440
if [ "$SWITCHED" = false ] && command -v n &> /dev/null; then
4541
n 22 >/dev/null 2>&1 && SWITCHED=true
4642
fi
@@ -51,7 +47,6 @@ if ! check_node_version; then
5147
fi
5248
fi
5349

54-
# Detect available editors in the system
5550
declare -a AVAILABLE_EDITORS
5651
declare -a EDITOR_CMDS
5752
declare -a EDITOR_SCHEMES
@@ -104,7 +99,6 @@ else
10499
echo "q) Quit"
105100
echo ""
106101

107-
# Handle interactive prompt even if script is piped via curl | bash
108102
if [ -c /dev/tty ]; then
109103
read -p "Select where to install CWC to: " choice < /dev/tty
110104
else
@@ -138,7 +132,6 @@ ZIP_URL=""
138132
while [ $PAGE -le 10 ]; do
139133
TAGS_JSON=$(curl -s "https://api.github.com/repos/robertpiosik/CodeWebChat/tags?per_page=100&page=$PAGE")
140134

141-
# Break if the page is empty or rate limited/not found
142135
if [[ "$TAGS_JSON" == *"\"message\":"* ]] || [[ "$TAGS_JSON" == "[]" ]] || [[ -z "$TAGS_JSON" ]]; then
143136
break
144137
fi

0 commit comments

Comments
 (0)