forked from anak10thn/ign-package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-modul
executable file
·40 lines (34 loc) · 1.32 KB
/
build-modul
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
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# copyleft (c) 2012 Ibnu Yahya <[email protected]>
LS=`ls ./SPECS |sed s/.spec//g`
while read MODULE
do
VERSION=`cat ./SPECS/$MODULE.spec |grep "Version:"|sed s/"Version:"//g`
RELEASE=`cat ./SPECS/$MODULE.spec |grep "Release:"|sed s/"Release:"//g`
ARC=`cat ./SPECS/$MODULE.spec |grep "BuildArch:"|sed s/"BuildArch:"//g`
if [ -f ./RPMS/$ARC/$MODULE-$VERSION-$RELEASE.$ARC.rpm ]; then
echo ----------source $MODULE sudah di build---------
else
echo ""
echo -----------paket $MODULE di build--------
rpmbuild -ba ./SPECS/$MODULE.spec
echo -----------paket $MODULE di build--------
echo ""
fi
done << ign
$LS
ign