OoO  Vers la  fin de  l'après-midi du  dimanche 21  novembre  2010, vers
16:37, Filippo Rusconi <listes.rusc...@laposte.net> disait :

> OK, so I may test if the content of the PYTHONPATH variable is empty
> the way below, so that I can set the path in differenciated manners :

> ~~~~~~~~~~ start-script ~~~~~~~~~~~

> #!/bin/sh

> # Only append ${PYTHONPATH} if it actually contains something. Thus,
> # test the length of the string in PYTHONPATH.
> if [ "${#PYTHONPATH}" = "0" ]
> then
>     PYTHONPATH=/usr/lib/mmass/mspy/plot
> else
>     PYTHONPATH=/usr/lib/mmass/mspy/plot:${PYTHONPATH}
> fi
> export PYTHONPATH

A shorter version:

export PYTHONPATH=/usr/lib/mmass/mspy/plot${PYTHONPATH:+:${PYTHONPATH}}
-- 
MY SUSPENSION WAS NOT "MUTUAL"
MY SUSPENSION WAS NOT "MUTUAL"
MY SUSPENSION WAS NOT "MUTUAL"
-+- Bart Simpson on chalkboard in episode BABF10

Attachment: pgpHW0NfJEGvf.pgp
Description: PGP signature

Reply via email to