From 30df94357d5687505b5d70e079bb056953feae1c 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. --- Source/Python/wrappers/mp4dash | 6 +++--- Source/Python/wrappers/mp4dashclone | 6 +++--- Source/Python/wrappers/mp4hls | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Python/wrappers/mp4dash b/Source/Python/wrappers/mp4dash index f9e5f206d..d78f09da7 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.realpath(sys.argv[0] + "/../../utils/mp4-dash.py"), sys.argv) \ No newline at end of file diff --git a/Source/Python/wrappers/mp4dashclone b/Source/Python/wrappers/mp4dashclone index 4d1bd65bb..d4effee3a 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.realpath(sys.argv[0] + "/../../utils/mp4-dash-clone.py"), sys.argv) \ No newline at end of file diff --git a/Source/Python/wrappers/mp4hls b/Source/Python/wrappers/mp4hls index a320dd113..4aa0e2474 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.realpath(sys.argv[0] + "/../../utils/mp4-hls.py"), sys.argv) \ No newline at end of file