File: Compile.sh

package info (click to toggle)
libmediainfo 25.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,472 kB
  • sloc: cpp: 272,822; ansic: 6,551; asm: 2,100; xml: 1,476; java: 1,245; sh: 1,203; cs: 1,189; python: 653; makefile: 444; pascal: 197; javascript: 169
file content (53 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download | duplicates (6)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/sh

# Initialization
test -d ../../Source || mkdir -p ../../Source
zlib_source=../../Source/zlib

##########################################################################
# Fetch if necessary
if test -e $zlib_source/configure; then
    echo
    echo The source of zlib are presents
    echo
else
    echo
    echo Downloading zlib...
    echo
    rm -fr $zlib_source
    git clone -b "v1.2.8" https://github.com/madler/zlib $zlib_source
    if test -e $zlib_source/configure; then
        echo
        echo zlib downloaded, compiling it
        echo
    else
        echo
        echo Error while downloading zlib
        echo
        exit 1
    fi
fi

##########################################################################
# Already compiled
if test -e $zlib_source/zlib/zlib.a || test -e $zlib_source/zlib/zlib.la; then
    echo
    echo zlib is already compiled, recompiling it
    echo
fi

##########################################################################
# Compile
cd $zlib_source
echo
echo Compiling zlib...
echo
./configure $*
make clean
make
# In the previous version:
    mkdir zlib
    cp zlib.h zlib
    cp zconf.h zlib

unset -v zlib_source