File: rpmbuild.sh

package info (click to toggle)
ndctl 82-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,460 kB
  • sloc: ansic: 42,027; sh: 3,974; makefile: 28
file content (18 lines) | stat: -rwxr-xr-x 487 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

spec=${1:-$(dirname $0)/rhel/ndctl.spec)}

pushd $(dirname $0) >/dev/null
[ ! -d ~/rpmbuild/SOURCES ] && echo "rpmdev tree not found" && exit 1
if ./git-version | grep -q dirty; then
	echo "Uncommitted changes detected, commit or undo them to proceed"
	git status -uno --short
	exit 1
fi
if [ ! -f $spec ]; then
	meson compile -C build rhel/ndctl.spec || exit
	spec=$(dirname $0)/build/rhel/ndctl.spec
fi
./make-git-snapshot.sh
popd > /dev/null
rpmbuild --nocheck -ba $spec