Revision 1084,
512 bytes
checked in by yasumichi, 14 years ago
(diff) |
filesセクション作成スクリプトの叩き台を追加
|
Rev | Line | |
---|
[1084] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | # check arguments |
---|
| 4 | if [ -z "$*" ]; then |
---|
| 5 | echo "Usage: `basename $0` name.spec" |
---|
| 6 | exit 1 |
---|
| 7 | fi |
---|
| 8 | |
---|
| 9 | SPEC=$1 |
---|
| 10 | |
---|
| 11 | BUILDROOT=`rpm -E '%{_tmppath}'`/`basename $0`-root |
---|
| 12 | |
---|
| 13 | # Remove BUILDROOT |
---|
| 14 | if [ -e $BUILDROOT ]; then |
---|
| 15 | rm -rf $BUILDROOT |
---|
| 16 | fi |
---|
| 17 | |
---|
| 18 | # Output files section |
---|
| 19 | if rpmbuild -bi --buildroot=$BUILDROOT $SPEC >/dev/null 2>&1 ;then |
---|
| 20 | echo '%files' |
---|
| 21 | echo '%defattr(-,root,root)' |
---|
| 22 | cd $BUILDROOT && find . -type f | sed -e 's/^\.//' |
---|
| 23 | #cd $BUILDROOT && find . -type f | sed -e 's/^\.//' | sed -e 's/\/[^\/]*$/\/\*/' | uniq |
---|
| 24 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.