PageRenderTime 24ms CodeModel.GetById 8ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/XML-FeedPP-Plugin-DumpJSON/make-dist.sh

http://xml-treepp.googlecode.com/
Shell | 50 lines | 30 code | 8 blank | 12 comment | 12 complexity | 306dfbb5d33cc777fb7c446db9885ea4 MD5 | raw file
 1#!/bin/sh
 2
 3die () {
 4    echo "$*" >&2
 5    exit 1
 6}
 7doit () {
 8    echo "\$ $*" >&2
 9    $* || die "[ERROR:$?]"
10}
11
12# rdfe=t/example/index-e.rdf
13# doit wget -O $rdfe~ http://www.kawa.net/rss/index-e.rdf
14# [ -f $rdfe ] || touch $rdfe
15# diff $rdfe $rdfe~ > /dev/null || doit /bin/mv -f $rdfe~ $rdfe
16# /bin/rm -f $rdfe~
17# 
18# rdfj=t/example/index-j.rdf
19# doit wget -O $rdfj~ http://www.kawa.net/index.rdf
20# [ -f $rdfj ] || touch $rdfj
21# diff $rdfj $rdfj~ > /dev/null || doit /bin/mv -f $rdfj~ $rdfj
22# /bin/rm -f $rdfj~
23
24egrep -v '^t/.*\.t$' MANIFEST > MANIFEST~
25ls -t t/*.t | sort >> MANIFEST~
26diff MANIFEST MANIFEST~ > /dev/null || doit /bin/mv -f MANIFEST~ MANIFEST
27/bin/rm -f MANIFEST~
28
29[ -f Makefile ] && doit make clean
30[ -f META.yml ] || touch META.yml
31doit perl Makefile.PL
32doit make
33doit make disttest
34
35main=`grep 'lib/.*pm$' < MANIFEST | head -1`
36[ "$main" == "" ] && die "main module is not found in MANIFEST"
37doit pod2text $main > README~
38diff README README~ > /dev/null || doit /bin/mv -f README~ README
39/bin/rm -f README~
40
41meta=`ls -t *-*.*/META.yml | head -1`
42diff META.yml $meta > /dev/null || doit /bin/cp -f $meta META.yml
43
44doit make dist
45[ -d blib ] && doit /bin/rm -fr blib
46[ -f pm_to_blib ] && doit /bin/rm -f pm_to_blib
47[ -f Makefile ] && doit /bin/rm -f Makefile
48[ -f Makefile.old ] && doit /bin/rm -f Makefile.old
49
50ls -lt *.tar.gz | head -1