INNER CODE UNIT · Java
basedir
UnevenSoftware/LeafPic · scripts/crowdin.sh:3
basedir=$(git rev-parse --show-toplevel)
apikey=$(tr -d ' \r\n' < "$basedir/scripts/crowdin.key")
location='app/src/main/res'
if [ -z "$basedir" -o -z "$apikey" ]; then
echo 'API key missing'
exit 1
fi
if [ -n "$(git status --porcelain $basedir/$location)" ]; then
echo 'Outstanding changes:'
git status --short "$basedir/$location"
exit 1
fi
response=$(curl -sS "https://api.crowdin.com/api/project/leafpic/export?key=$apikey" | grep '<success' )
echo $response