On 29 Sep 08:41, Daniel Axtens wrote: > Stephen Finucane <[email protected]> writes: > > > On 28 Sep 15:22, Daniel Axtens wrote: > >> - Take PW_PYTHON, allowing the python version to be set > >> - Only override DJANGO_SETTINGS_MODULE if it's not in the env > >> - Pass parameters to parsemail.py > >> > >> Signed-off-by: Daniel Axtens <[email protected]> > > > > I might rework this slightly to avoid the export, but I'm happy with > > this in general. > > > > Reviewed-by: Stephen Finucane <[email protected]> > > > >> --- > >> patchwork/bin/parsemail.sh | 11 +++++++++-- > >> 1 file changed, 9 insertions(+), 2 deletions(-) > >> > >> diff --git a/patchwork/bin/parsemail.sh b/patchwork/bin/parsemail.sh > >> index 9973392de9d4..769a45767c19 100755 > >> --- a/patchwork/bin/parsemail.sh > >> +++ b/patchwork/bin/parsemail.sh > >> @@ -22,8 +22,15 @@ > >> BIN_DIR=`dirname $0` > >> PATCHWORK_BASE=`readlink -e $BIN_DIR/../..` > >> > >> +if [ -z $PW_PYTHON ]; then > >> + PW_PYTHON=python2 > >> +fi > >> + > >> +if [ -z $DJANGO_SETTINGS_MODULE ]; then > >> + export DJANGO_SETTINGS_MODULE=patchwork.settings.production > >> +fi > >> + > >> PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \ > >> - DJANGO_SETTINGS_MODULE=patchwork.settings.production \ > > > > I know it might be more convoluted, but can we use the following > > instead? > > > > DJANGO_SETTINGS_MODULE="$DJANGO_SETTINGS_MODULE" \ > > > > I ask as I think 'export' is a Bash'ism (tcsh uses 'setenv', for > > example). > > Hmm, shellcheck doesn't seem to mind: www.shellcheck.net > > But if you want to do it that way I have no objections. Happy for you to > change it, or I can spin a v3.
Made aforementioned change and merged. Stephen _______________________________________________ Patchwork mailing list [email protected] https://lists.ozlabs.org/listinfo/patchwork
