1
0
Fork 0

Refactoring

This commit is contained in:
Florian RICHER (MrDev023) 2022-04-13 23:56:37 +02:00
parent b2b7d78643
commit 4fab1e612a

View file

@ -21,16 +21,20 @@ if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
Start-Sleep -Seconds 1 Start-Sleep -Seconds 1
} else { } else {
try { try {
$appDatasToSymlink = 'gitui' $appToSymlink = @(
Foreach ($item in $appDatasToSymlink) { @{
$config_folder = "$env:USERPROFILE\.config\$item" Name = 'gitui';
$symlink_folder = "$env:APPDATA\$item" Path = "$env:APPDATA";
New-Item -Force -Path $symlink_folder -ItemType SymbolicLink -Value $config_folder },
@{
Name = 'nvim';
Path = "$env:LOCALAPPDATA";
} }
$localAppDatasToSymlink = 'nvim' )
Foreach ($item in $localAppDatasToSymlink) { Foreach ($item in $appToSymlink) {
$config_folder = "$env:USERPROFILE\.config\$item" $symlink_folder = $item.Path + '\' + $item.Name
$symlink_folder = "$env:LOCALAPPDATA\$item" $name = $item.Name
$config_folder = "$env:USERPROFILE\.config\$name"
New-Item -Force -Path $symlink_folder -ItemType SymbolicLink -Value $config_folder New-Item -Force -Path $symlink_folder -ItemType SymbolicLink -Value $config_folder
} }
Exit Exit