on xenial help sign in
Only cd once.
c8b3d28Robert Bruce Park
po/update-unity-pot+4−3
@@ -1,14 +1,15 @@
1#!/bin/sh
1#!/bin/sh
2set -e
2set -e
3−cd "$(dirname "$(readlink --canonicalize "$0")")"
3+PO_DIR="$(dirname "$(readlink --canonicalize "$0")")"
4−PO_DIR=$PWD
4+
5+cd "$(dirname $PO_DIR)"
5
6
6PROGNAME=$(basename $0)
7PROGNAME=$(basename $0)
7
8
8# Create a list of files to scan
9# Create a list of files to scan
9GETTEXT_FILES=".tmp.unity8.lst"
10GETTEXT_FILES=".tmp.unity8.lst"
10trap 'rm -f "$GETTEXT_FILES"' EXIT
11trap 'rm -f "$GETTEXT_FILES"' EXIT
11−cd ..
12+
12find \( -name '*.h' -o -name '*.cpp' -o -name '*.qml' -o -name '*.js' \) \
13find \( -name '*.h' -o -name '*.cpp' -o -name '*.qml' -o -name '*.js' \) \
13 -a ! \( -path './debian/*' -o -path './builddir/*' -o -path './build/*' -o -path './tests/*' -o -path './.bzr/*' \) | sort \
14 -a ! \( -path './debian/*' -o -path './builddir/*' -o -path './build/*' -o -path './tests/*' -o -path './.bzr/*' \) | sort \
14> $GETTEXT_FILES
15> $GETTEXT_FILES