Debian Codegraph @

toolbox/make-rpm.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Steven Shiau <steven _at_ clonezilla org)
3 #
4 PKG="drbl"
5 RPMBUILD="${HOME}/rpmbuild/"
6 SPEC_FILE="$PKG.spec"
7
8 #
9 set -e
10 #
11 [scip-shell system . . `[`. ! -f "$SPEC_FILE" ] && echoscip-shell system . . echo. "Can NOT find spec file $SPEC_FILE" && exit 1
12
13 #
14 VER=`grepscip-shell system . . grep. ^Version $SPEC_FILE |sedscip-shell system . . sed. -e "s/\t/ /g" -e "s/ \+/ /g" |cutscip-shell system . . cut. -d":" -f2 |trscip-shell system . . tr. -d " "`
15 RELEASE=`grepscip-shell system . . grep. ^Release $SPEC_FILE |sedscip-shell system . . sed. -e "s/\t/ /g" -e "s/ \+/ /g" |cutscip-shell system . . cut. -d":" -f2 |trscip-shell system . . tr. -d " "`
16 echoscip-shell system . . echo. "VER, RELEASE: $VER, $RELEASE"
17
18 #
19 TARBALL=drbl-$VER.tar.xz
20
21 # check
22 [scip-shell system . . `[`. ! -f "$TARBALL" ] && echoscip-shell system . . echo. "Can NOT find file $TARBALL! Did you forget to update the rdate in file drbl.spec ? Program Stop!!!" && exit 1
23
24 # mkdir for build
25 mkdirscip-shell system . . mkdir. -p $RPMBUILD/SOURCES/$PKG-$VER
26
27 cpscip-shell system . . cp. -f $TARBALL $RPMBUILD/SOURCES/$PKG-$VER/
28 rpmbuild -ba $SPEC_FILE
29
30 #
31 [scip-shell system . . `[`. -d RPMS.drbl-test ] && rmscip-shell system . . rm. -rf RPMS.drbl-test
32 mkdirscip-shell system . . mkdir. RPMS.drbl-test
33 cpscip-shell system . . cp. -v $RPMBUILD/SRPMS/$PKG-$VER-$RELEASE.src.rpm $RPMBUILD/RPMS/$PKG-$VER-$RELEASE.*.rpm RPMS.drbl-test
34 [scip-shell system . . `[`. ! -d old ] && mkdirscip-shell system . . mkdir. old
35 cpscip-shell system . . cp. -af $TARBALL RPMS.drbl-test
36 #mv -f $TARBALL old
37 cpscip-shell system . . cp. -fv doc/{GPL,ChangeLog.txt,RELEASE-NOTES,Known_issues*.txt} RPMS.drbl-test
38 exit 0