From a10720b4e8e57c4f64964fa625fd5f13c2222b06 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Mon, 3 Jul 2017 16:01:24 +0200 Subject: [PATCH] Exec with real path to python wrappers Makes it possible to symlink to them from /usr/bin etc to make dist packaging easier. Could probably be done with shell script but python is already requried so it seems more portable. Add missing exec bit for mp4-hls.py --- Source/Python/utils/mp4-hls.py | 0 Source/Python/wrappers/mp4dash | 6 +++--- Source/Python/wrappers/mp4dashclone | 6 +++--- Source/Python/wrappers/mp4hls | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) mode change 100644 => 100755 Source/Python/utils/mp4-hls.py diff --git a/Source/Python/utils/mp4-hls.py b/Source/Python/utils/mp4-hls.py old mode 100644 new mode 100755 diff --git a/Source/Python/wrappers/mp4dash b/Source/Python/wrappers/mp4dash index f9e5f206d..241d5858e 100755 --- a/Source/Python/wrappers/mp4dash +++ b/Source/Python/wrappers/mp4dash @@ -1,3 +1,3 @@ -#! /bin/bash -BASEDIR=$(dirname $0) -exec python "$BASEDIR/../utils/mp4-dash.py" "$@" +#!/usr/bin/env python +import os,sys +os.execv(os.path.dirname(os.path.realpath(sys.argv[0])) + "/../utils/mp4-dash.py", sys.argv) diff --git a/Source/Python/wrappers/mp4dashclone b/Source/Python/wrappers/mp4dashclone index 4d1bd65bb..671579345 100755 --- a/Source/Python/wrappers/mp4dashclone +++ b/Source/Python/wrappers/mp4dashclone @@ -1,3 +1,3 @@ -#! /bin/bash -BASEDIR=$(dirname $0) -exec python "$BASEDIR/../utils/mp4-dash-clone.py" "$@" +#!/usr/bin/env python +import os,sys +os.execv(os.path.dirname(os.path.realpath(sys.argv[0])) + "/../utils/mp4-dash-clone.py", sys.argv) diff --git a/Source/Python/wrappers/mp4hls b/Source/Python/wrappers/mp4hls index a320dd113..ec6c88444 100755 --- a/Source/Python/wrappers/mp4hls +++ b/Source/Python/wrappers/mp4hls @@ -1,3 +1,3 @@ -#! /bin/bash -BASEDIR=$(dirname $0) -exec python "$BASEDIR/../utils/mp4-hls.py" "$@" +#!/usr/bin/env python +import os,sys +os.execv(os.path.dirname(os.path.realpath(sys.argv[0])) + "/../utils/mp4-hls.py", sys.argv)