From 613f3d2a56dc66ef3e83de95be212ca4f6a0d925 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Fri, 9 Sep 2022 08:56:11 +0200 Subject: [PATCH] update_rev: aggiornamento diretto dell'hash nel file. --- update_rev.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update_rev.sh b/update_rev.sh index dea66c3..ebe6459 100755 --- a/update_rev.sh +++ b/update_rev.sh @@ -1,4 +1,6 @@ #!/bin/bash url=$(awk '/url/ {gsub("\"", "", $3); gsub(";", "", $3); print $3}' $1) -git ls-remote $url refs/heads/$2 | awk '{print $1}' +sha=$(git ls-remote $url refs/heads/$2 | awk '{print $1}') + +sed -i -e "s/rev[ ]*=[ ]*\".*\"/rev = \"$sha\"/g" $1 -- 2.49.0