aboutsummaryrefslogtreecommitdiff
path: root/scripts/makerpm.sh
blob: bfa2b47f02b92acdcc383dab7eb46af740046045 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

PWD=`pwd`

## If we're not in the scripts directory 
## assume the base directory.
if test "`basename $PWD`" != "scripts"; then
	MYOLDPWD=`pwd`
	cd `dirname $0`
fi

./makedist.sh

rpmbuild -bb mpd.spec

if test $? -eq 0; then
	echo 'Your RPM should be ready now'
else
	echo 'Something went wrong when building your RPM'
fi

if test -f ../mpd-?.??.?.tar.gz;
then
	rm ../mpd-?.??.?.tar.gz
fi

if test "`basename $PWD`" != "scripts"; then
	cd $MYOLDPWD
fi