File: install_docker_test_pkg_common.sh

package info (click to toggle)
python-os-ken 4.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 21,396 kB
  • sloc: python: 100,059; erlang: 14,517; ansic: 594; sh: 338; makefile: 136
file content (39 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (7)
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/bash
set -ex

function init_variables {
    APTLINE_DOCKER=0
    DIR_BASE=/tmp
}

function process_options {
    local max
    local i
    max=$#
    i=1
    while [ $i -le $max ]; do
        case "$1" in
            -a|--add-docker-aptline)
                APTLINE_DOCKER=1
                ;;
            -d|--download-dir)
                shift; ((i++))
                DIR_BASE=$1
                ;;
        esac
        shift; ((i++))
    done
}

function install_pipework {
    if ! which /usr/local/bin/pipework >/dev/null
    then
        sudo rm -rf $DIR_BASE/pipework
        git clone https://github.com/jpetazzo/pipework.git $DIR_BASE/pipework
        sudo install -m 0755 $DIR_BASE/pipework/pipework /usr/local/bin/pipework
    fi
}

function install_depends_pkg {
    install_pipework
}