chiark / gitweb /
Break out clisupport.rs
[otter.git] / run-inkscape-extension
1 #!/bin/bash
2 #
3 # inkscape 0.92.4 on Debian buster:
4 # These scripts are perfectly good scripts; they are executable,
5 # and they work with the #! that is provided.  They do not work with
6 # python2.
7 #
8 # inkscape 1.0.2 on Debian bullseye:
9 # These files are not executable.  They say #!/usr/bin/env python
10 # but the system probably doesn't have any such thing, because
11 # that would (on a sane system) refer to python2 and there is
12 # only python3.
13 #
14 # I don't think it is going to be possible to sanely find out what
15 # python version is actually expected.  But I think a *reasonable*
16 # demand on the environment is that either:
17 #   - If these scripts are executable, they can be executed
18 #   - Otherwise, they are not using ancient and obsolete python
19
20 $(
21   if test -x "$1"; then :; else
22     type -p python3 || type -p python
23   fi
24 ) "$@"