Skip to content

Commit

Permalink
Add windows installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Wes Rupert committed Oct 1, 2022
1 parent 675eb5a commit e2eeebf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if [[ "$run_on_firefox" == true ]]; then
continue
fi
profile_dest=$(cd "$profile"; pwd)
install true "$(basename "$profile_dest")" 'Firefox' "$profile_dest/chrome"
install true "$(basename "$profile_dest")" 'firefox' "$profile_dest/chrome"
done
else
echo 'Firefox profiles not present, skipping...'
Expand Down
27 changes: 27 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function Dir-Install {
param ([string]$dir, [string]$path)
echo "Installing $dir to $path..."
Get-ChildItem "$PSScriptRoot\$dir" | Foreach-Object {
$orig = $_.FullName
$file = $_.Name
$dest = "$path\$file"
if (-not (Test-Path -Path $dest)) {
New-Item -ItemType SymbolicLink -Target $orig -Path $dest -ErrorAction Stop
}
}
}

# Install features
Dir-Install -Dir 'configs' -Path "$HOME\.config"
Dir-Install -Dir 'dotfiles' -Path "$HOME"
Dir-Install -Dir 'windows' -Path "$HOME"

$firefoxprofiles = "$($env:APPDATA)\Mozilla\Firefox\Profiles"
Get-ChildItem "$firefoxprofiles" | Foreach-Object {
$profile = $_.FullName
$dest = "$profile\chrome"
New-Item -Type Directory $dest -ErrorAction SilentlyContinue
Dir-Install -Dir 'firefox' -Path "$dest"
}

echo 'Done!'

0 comments on commit e2eeebf

Please sign in to comment.