File: movefiles.sh

package info (click to toggle)
egenix-mx-base 3.2.8-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,420 kB
  • ctags: 6,208
  • sloc: ansic: 22,304; python: 18,124; sh: 137; makefile: 121
file content (39 lines) | stat: -rw-r--r-- 1,665 bytes parent folder | download | duplicates (3)
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
#! /bin/sh

set -e

VERSIONS="$*"
PACKAGES="BeeBase DateTime Queue Proxy Stack TextTools Tools UID URL"

for ver in $VERSIONS; do
    for pkg in $PACKAGES; do
        debpkg=python-egenix-mx$(echo -n $pkg | tr '[:upper:]' '[:lower:]')

        mv debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/mx$pkg/*.h \
           debian/python-egenix-mx-base-dev/usr/include/python$ver/mx

        # Remove duplicated files, move documentation and examples.
        rm -f debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/README \
              debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/LICENSE \
              debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/COPYRIGHT

        install -d debian/$debpkg-doc/usr/share/doc/$debpkg-doc

        if [ -d debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Examples ]; then
            install -d debian/$debpkg-doc/usr/share/doc/$debpkg-doc/examples

            rm -f debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Examples/__init__.* \
                  debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Examples/*.py?
            mv debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Examples/* \
               debian/$debpkg-doc/usr/share/doc/$debpkg-doc/examples
        fi

        cp mx/$pkg/Doc/mx$pkg.pdf debian/$debpkg-doc/usr/share/doc/$debpkg-doc

        # Remove unwanted cruft.
        rm -rf debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Examples \
               debian/$debpkg/usr/lib/python$ver/*-packages/mx/$pkg/Doc \
               debian/$debpkg/usr/lib/python$ver/*-packages/mx/*/LICENSE
        find debian/$debpkg -name '*.py[co]' | xargs rm -f
    done
done