File: check-dist

package info (click to toggle)
cockpit 239-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,268 kB
  • sloc: javascript: 245,474; ansic: 72,273; python: 23,634; xml: 6,155; sh: 2,919; makefile: 923; sed: 5
file content (21 lines) | stat: -rwxr-xr-x 629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -eu

# Check for mistakes in tarball distribution

# Make sure we don't distribute gz files
find $1/dist -name '*.gz' -print | sort | while read file; do
        find $1/dist -name '*.gz' -print >&2
        echo "Refusing to distribute gzip files" >&2
        exit 1
done

# Make sure all po files are valid
find $1/po -name '*.po' -print | while read file; do
    if ! msgfmt "$file" -o /dev/null; then
        echo "Refusing to distribute invalid po file: $file" >&2
        exit 1
    fi
done

# Validate our AppStream metadata
find $1 -name '*.metainfo.xml' -o -name '*.appdata.xml' | xargs appstream-util validate