File: tgz2zip

package info (click to toggle)
quantlib 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,768 kB
  • sloc: cpp: 398,987; makefile: 6,574; python: 214; sh: 150; lisp: 86
file content (27 lines) | stat: -rwxr-xr-x 961 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
# 'tgz2zip Foo' converts Foo.tar.gz into Foo.zip converting Unix end-of-line
# to DOS in the process.

set -e

TARBALL=$1
BASENAME=${TARBALL%.tar.gz}

tar xfz ${TARBALL}
find ${BASENAME} -name '*.[hc]pp' -o -name '*.[hc]' \
     -o -name '*.xhtml' -o -name '*.html' -o -name '*.htm' -o -name '*.css' \
     -o -name '*.docs' -o -name '*.doxy' -o -name '*.qbk' \
     -o -name '*.el' -o -name '*.cmake' \
     -o -name '*.ipp' -o -name '*.jam' -o -name '*.tpp' \
     -o -iname '*.txt' -o -name '*.tex' -o -name '*.dtd' \
     -o -name '*.xml' -o -name 'stub.*' -o -name '*.rst' \
     -o -name '*.i' -o -name '*.py' -o -name '*.rb' -o -name '*.R' \
     -o -iname '*.pl' -o -name '*.scm' -o -name '*.ss' \
     -o -name '*.cs' -o -name '*.java' -o -name '*.nsi' \
     -o -name '*.tpp' -o -name '*.Makefile' -o -name '*.README' \
     -o -name '*.configure' \
 | xargs --exit todos -o -p
zip -q -9 -r ${BASENAME}.zip ${BASENAME}
rm -rf ${BASENAME}