#!/bin/bash

set -e -u



[ $# != 2 ] && {
	echo -e "\nusage: $0 release lang\n" >&2
	exit 1
}
rel=$1
lang=$2

files="files-$rel"

# (internal, builds filelist if not present)
#
[ -f $files ] || {
	distro="jessie"
	repo="$PRJ/external/$distro"
	here=$(pwd)
	cd $repo
	echo -n "rebuilding file list $files from $repo ... " >&2
	ls libobas*${rel}* libreoffice*${rel}* >"$here/$files"
	echo "ok" >&2
	cd "$here"
}

exec egrep -- "-$lang[-_]" $files | sed -e 's/_.*//'
