From 4e6475c4a32669f7946a32dee577c416feb899ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 6 Apr 2021 01:25:57 +0300 Subject: [PATCH 1/3] Pass arguments to main.py --- plex_trakt_sync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plex_trakt_sync.sh b/plex_trakt_sync.sh index 751b52a884..2ddd854821 100755 --- a/plex_trakt_sync.sh +++ b/plex_trakt_sync.sh @@ -1,3 +1,3 @@ #!/bin/sh PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin -python3 ./main.py \ No newline at end of file +python3 ./main.py "$@" From e080a8d36e27f95a6f982f39ccb9a33493997635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 6 Apr 2021 01:26:34 +0300 Subject: [PATCH 2/3] Allow calling plex_trakt_sync.sh from any directory --- plex_trakt_sync.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plex_trakt_sync.sh b/plex_trakt_sync.sh index 2ddd854821..518411272a 100755 --- a/plex_trakt_sync.sh +++ b/plex_trakt_sync.sh @@ -1,3 +1,7 @@ #!/bin/sh PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin -python3 ./main.py "$@" +set -eu + +dir=$(dirname "$0") + +exec python3 "$dir/main.py" "$@" From d526a79a4c1eb0fbc4212d1050e7c14493f55dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 6 Apr 2021 01:26:48 +0300 Subject: [PATCH 3/3] Do not reset PATH This breaks using via locally installed pipenv --- plex_trakt_sync.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/plex_trakt_sync.sh b/plex_trakt_sync.sh index 518411272a..177164b029 100755 --- a/plex_trakt_sync.sh +++ b/plex_trakt_sync.sh @@ -1,5 +1,4 @@ #!/bin/sh -PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin set -eu dir=$(dirname "$0")