From fc4a1a759aafaa5f7677396c24daa3e6ab8f3560 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 8 Dec 2014 02:40:48 +0000 Subject: [PATCH] add script to find pots; rename localize to extractpot --- localize.sh => extractpot.sh | 0 findpots.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) rename localize.sh => extractpot.sh (100%) create mode 100755 findpots.sh diff --git a/localize.sh b/extractpot.sh similarity index 100% rename from localize.sh rename to extractpot.sh diff --git a/findpots.sh b/findpots.sh new file mode 100755 index 0000000..61d7834 --- /dev/null +++ b/findpots.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +cwd="$(pwd)" +if ! type -p find ;then + echo "find is not in your PATH" + exit 1 +elif ! type -p grep ;then + echo "grep is not in your PATH" + exit 1 +elif ! type -p sed ;then + echo "sed is not in your PATH" + exit 1 +fi + +packs=("kdelibs" "kde-baseapps" "kde-workspace" "kde-extraapps") + +source "$(dirname $0)/fetch.sh" + +echo > pots.txt +for p in ${packs[@]};do + echo "Finding POTs in $p..." + find "$p" -name Messages.sh -exec grep -o 'podir/.*.pot' {} + | sed 's|podir/||g' >> pots.txt +done + +echo "All done"