From 25e2f53fb81e6b2fa0d396a4e4f2a4b9dc7e9e6c Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Tue, 20 Apr 2021 13:48:24 +0300 Subject: [PATCH] work from any dir --- template_picker | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/template_picker b/template_picker index 52aa8ba..0c40749 100755 --- a/template_picker +++ b/template_picker @@ -1,3 +1,9 @@ -#!/bin/sh +#!/bin/sh -e -python3 -m antp "$@" +readonly this=$(readlink -f -- "$0") +readonly dir=$(dirname -- "$this") +readonly module=antp + +cd -- "$dir" || exit + +python3 -m "$module" "$@"