File: module-setup.sh

package info (click to toggle)
python-diskimage-builder 3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,616 kB
  • sloc: sh: 7,689; python: 3,933; makefile: 34
file content (27 lines) | stat: -rwxr-xr-x 770 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
#!/bin/bash

# Dracut is bash too, and it doesn't play nicely with our usual sets
# dib-lint: disable=setu sete setpipefail dibdebugtrace

check() {
    return 0
}

depends() {
    return 0
}

install() {
    inst /bin/targetcli
    inst "$moddir/targetcli-wrapper" /targetcli-wrapper
    inst "$moddir/iscsi-func" /iscsi-func
    # Install all of Python
    # TODO(bnemec): At some point this will need to be extended to support
    # Python 3, but for the moment we aren't using that anyway.
    inst /usr/bin/python
    local all_of_python=()
    while IFS='' read -r -d '' i; do
        all_of_python+=("$i")
    done < <(find /usr/lib64/python2.7/ /usr/lib/python2.7/ -type f -not -name "*.pyc" -not -name "*.pyo" -print0)
    inst_multiple "${all_of_python[@]}"
}