From ab7460d8db773ac60c28d815bb7017052a716dc9 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Sat, 1 Apr 2023 10:06:49 +0530 Subject: [PATCH] update script to use relative path --- purge_unused_strings.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purge_unused_strings.sh b/purge_unused_strings.sh index d8e11ffdf..7585a0a53 100644 --- a/purge_unused_strings.sh +++ b/purge_unused_strings.sh @@ -8,17 +8,17 @@ then fi # Get the keys from the JSON file -keys=$(jq -r 'keys[]' /Users/abhi/ente/bada-frame/public/locales/en/translation.json) +keys=$(jq -r 'keys[]' ./public/locales/en/translation.json) # Loop through the keys for key in $keys do # Check if the key is present in any of the files in the folder - grep -rqE "'$key'|\"$key\"" /Users/abhi/ente/bada-frame/src + grep -rqE "'$key'|\"$key\"" ./src if [ $? -ne 0 ] then echo "$key is not present as a string in any of the files in the folder" # Remove the key from the JSON file - jq "del(.\"$key\")" /Users/abhi/ente/bada-frame/public/locales/en/translation.json > /tmp/temp.json && mv /tmp/temp.json /Users/abhi/ente/bada-frame/public/locales/en/translation.json + jq "del(.\"$key\")" ./public/locales/en/translation.json > /tmp/temp.json && mv /tmp/temp.json ./public/locales/en/translation.json fi done