From c40ddf42fd6f3ab3d536c762eb6dfa38f02d6bd6 Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Tue, 1 Feb 2022 17:48:58 +0000
Subject: [PATCH] os_win32/update-smart-drivedb.ps1.in: Avoid bogus SVN Id
 expansion.

git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5309 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/os_win32/update-smart-drivedb.ps1.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/smartmontools/os_win32/update-smart-drivedb.ps1.in b/smartmontools/os_win32/update-smart-drivedb.ps1.in
index e1b4dd17c..0f39c92fd 100644
--- a/smartmontools/os_win32/update-smart-drivedb.ps1.in
+++ b/smartmontools/os_win32/update-smart-drivedb.ps1.in
@@ -283,7 +283,8 @@ function unexpand_svn_id($source, $dest)
 {
   # For -NoNewLine:
   #Requires -Version 5
-  (Get-Content -Raw -Path $source) -replace '\$Id: drivedb\.h [0-9][0-9]* 2[-0-9]* [012][:0-9]*Z [a-z][a-z0-9]* \$','$Id$' `
+  (Get-Content -Raw -Path $source) -replace `
+    ('\$'+'Id: drivedb\.h [0-9][0-9]* 2[-0-9]* [012][:0-9]*Z [a-z][a-z0-9]* \$'),('$'+'Id'+'$') `
   | Set-Content -NoNewLine -Path $dest
 }
 
-- 
GitLab