Skip to content

Commit

Permalink
improve compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 30, 2024
1 parent c72474a commit cffd7e4
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion project/scripts/project-translation-compile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
#!/usr/bin/env bash

for f in /usr/src/project/*\_*.ts
set -e

PROJECT=$1

if [[ -z ${PROJECT} ]]; then
echo "Script takes the QGIS project path or its directory as argument"
exit 1
fi

PATH=$(dirname ${PROJECT})

echo $PATH

if [[ ! -d ${PATH} ]]; then
echo "'${PATH}' directory does not exist"
exit 1
fi

FOUND=0
for f in ${PATH}/*\_*.ts
do
FOUND=1
lrelease $f ${f%.ts}.qm
done

if [[ ${FOUND} -eq 0 ]]; then
echo "No TS file found in '${PATH}'"
fi

0 comments on commit cffd7e4

Please sign in to comment.