summaryrefslogtreecommitdiffstats
path: root/build_pkg.sh
blob: 5219389b304a2cea472a77dfdd06ba285cb270fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -x 

DIR=$(pwd)

XPKG_CMD=$1
PKG=$2
rm -rf $DIR/$PKG
echo check out source from fedora or rhel. We need the spec file
$XPKG_CMD clone -a $PKG

echo download the source from the master branch
cd $DIR/$PKG
XPKG_CMD switch-branch rawhide
XPKG_CMD srpm

if [ ! -d ../packages/SRPMS ]; then
    mkdir -p ../packages/SRPMS 
fi

cp $PKG-*.src.rpm ../packages/SRPMS