2022-05-09 20:25:49 +00:00
|
|
|
#!/bin/bash
|
2024-06-24 16:40:09 +00:00
|
|
|
|
|
|
|
COMPSFILE=$1
|
|
|
|
DISTRO=$2
|
2024-08-20 09:14:31 +00:00
|
|
|
CURDIR="${0%/*}"
|
2024-06-24 16:40:09 +00:00
|
|
|
|
2024-08-09 06:26:05 +00:00
|
|
|
if [ -z "$COMPSFILE" ] || [ -z "$DISTRO" ]; then
|
|
|
|
echo "Usage: $0 <compsfile> <distro>"
|
|
|
|
exit 1
|
2024-06-24 16:40:09 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
LANG=C intltool-merge -x -u po/ $COMPSFILE.in $COMPSFILE
|
2024-08-20 09:14:31 +00:00
|
|
|
xsltproc --stringparam distro $DISTRO --novalid -o $COMPSFILE ${CURDIR}/comps-distro-only.xsl $COMPSFILE
|
2024-08-09 06:22:51 +00:00
|
|
|
|
|
|
|
echo "Cleaning up empty space left over"
|
|
|
|
sed -i '/^ $/d' "${COMPSFILE}"
|