mirror of
https://github.com/danielmiessler/SecLists.git
synced 2026-08-11 11:48:10 +00:00
fix(cicd): Fixed line-ending normalization on "remote-wordlists-updater.yml"
Fixes #397
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE="$1"
|
||||
|
||||
if [[ -z "$FILE" ]]; then
|
||||
echo "This script renormalizes a file until its SHA256 hash stops changing, ensuring proper normalization."
|
||||
echo "Usage: $0 <file_path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while true; do
|
||||
ORIGINAL_HASH=$(sha256sum "$FILE" | awk '{print $1}')
|
||||
|
||||
git add --renormalize "$FILE" && git add "$FILE"
|
||||
|
||||
NEW_HASH=$(sha256sum "$FILE" | awk '{print $1}')
|
||||
|
||||
if [[ "$ORIGINAL_HASH" == "$NEW_HASH" ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user