Commit b3d63d87 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

add powershell version and adapt shell script to match

parent 0da35dc2
Loading
Loading
Loading
Loading

other/get_md5.ps1

0 → 100644
+9 −0
Original line number Diff line number Diff line
param(
    [Parameter(Mandatory)]
    [String]$out_file
)

(Get-FileHash .\cat?\c*\*.wav -Algorithm MD5 | Out-String -Width 9999) |
ForEach-Object { $_.replace( -join ((Get-Location) , "\"), ".\") } |
ForEach-Object { $_ -replace (" ", "") } |
Out-File $out_file
 No newline at end of file
+9 −3
Original line number Diff line number Diff line
@@ -39,12 +39,18 @@ fi

system=$(uname -s)

echo "" > $1
echo "AlgorithmHashPath" > $1
echo "-----------------" > $1

if [ "$system" = "Darwin" ]; then
    md5 -r cat?/c??/*.wav | awk '{print "MD5"toupper($1)".\\"$2 }' | tr -s '/' '\\' >$1
else
    md5sum cat?/c??/*.wav | awk '{print "MD5"toupper($1)".\\"$2 }' | tr -s '/' '\\' >$1
fi

echo ""
echo ""
echo ""
echo "" > $1
echo "" > $1
echo "" > $1

unix2dos $1
 No newline at end of file