modified: RdzeN-Profile.ps1

This commit is contained in:
Tomasz Kostrzewa 2024-03-06 00:39:15 +01:00
parent 59c20fed67
commit 33e7c6f5c3

View File

@ -50,7 +50,7 @@ if (-not (Test-Path $path_profile_file)) {
#Reload-Profile #Reload-Profile
} else { } else {
# Check if the profile file has been modified # Check if the profile file has been modified
$local_profile_hash = Get-FileHash -Path $path_profile_file -Algorithm MD5 $local_profile_hash = Get-FileHash -Path $path_profile_file -Algorithm SHA1
$remote_profile_hash = git hash-object $path_profile_file $remote_profile_hash = git hash-object $path_profile_file
if ($local_profile_hash.Hash -ne $remote_profile_hash.Trim()) { if ($local_profile_hash.Hash -ne $remote_profile_hash.Trim()) {
@ -74,7 +74,7 @@ $remote_functions_hashes = @{}
# Iterate through local functions # Iterate through local functions
Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object { Get-ChildItem $path_gitea_powershell_profile_functions | ForEach-Object {
$local_functions_hashes[$_.Name] = (Get-FileHash -Path $_.FullName -Algorithm MD5).Hash $local_functions_hashes[$_.Name] = (Get-FileHash -Path $_.FullName -Algorithm SHA1).Hash
} }
# Get remote functions hashes # Get remote functions hashes