configure 802 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/sh

if [ $# -eq 1 ]; then
    for help_option in -h --help; do
        if [ "$1" = $help_option ]; then
            if [ -z "$PAGER" ]; then PAGER=false; fi
            $PAGER INSTALL || pager INSTALL || less INSTALL \
Oskar Skog's avatar
Oskar Skog committed
8
                || more INSTALL || echo Read '"INSTALL"'
9 10 11 12 13
            exit
        fi
    done
    for version_option in -V --version; do
        if [ "$1" = $version_option ]; then
14 15 16
            echo "Anonymine $(grep 'VERSION := ' Makefile.static |cut -d= -f2)"
            echo "Handmade configure and configure.py"
            exit 0
17 18 19 20
        fi
    done
fi

21
for python_version in pypy3 pypy2 pypy python3 python2 python; do
22 23 24 25 26 27 28
    "$python_version" -c '' 2>/dev/null || continue
    "$python_version" configure.py "[email protected]"
    exit 0
done

echo "No Python version found" >&2
exit 1