File: patch-tools.sh

package info (click to toggle)
mpi4py 4.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,564 kB
  • sloc: python: 35,306; ansic: 16,482; sh: 837; makefile: 618; cpp: 193; f90: 178
file content (14 lines) | stat: -rwxr-xr-x 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -euo pipefail

case "$(uname)" in
    Linux)  toolname=auditwheel;;
    Darwin) toolname=delocate-wheel;;
esac

if [ "$(uname)" == Linux ] || [ "$(uname)" == Darwin ]; then
    here=$(cd "$(dirname -- "$0")" && pwd -P)
    filename=$(command -v "$toolname")
    shebang=$(head -n 1 "$filename")
    sed "1 s|^.*$|$shebang|" "$here/$toolname.py" > "$filename"
fi