2021-05-22 13:53:49 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Checks the addons messages.po files
|
|
|
|
#
|
|
|
|
DIR=${FRIENDICA_DIR:-$PWD}
|
|
|
|
ADDON_DIR=${FRIENDICA_ADDON_DIR:-"$DIR/addon"}
|
2021-10-05 11:06:16 +02:00
|
|
|
CHANGED_FILES=${CHANGED_FILES:-"${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER}"}
|
2021-05-22 13:53:49 +02:00
|
|
|
|
2021-10-05 11:06:16 +02:00
|
|
|
cd "$ADDON_DIR" || exit 1
|
|
|
|
changed_files=($(git diff --diff-filter=ACM --name-status "${CHANGED_FILES}" | cut -f2 | sed '/^\./d' | cut -d "/" -f1 | uniq))
|
|
|
|
cd "$DIR" || exit 1
|
2021-05-22 13:53:49 +02:00
|
|
|
for addon in "${changed_files[@]}"; do
|
2021-10-05 11:06:16 +02:00
|
|
|
./bin/run_xgettext.sh --addon "$addon";
|
2021-05-22 13:53:49 +02:00
|
|
|
done
|