Use os.path.realpath to allow symlinking to install

from e.g. /opt/redo/bin into /usr/local/bin (#21)
This commit is contained in:
Tony Garnock-Jones 2018-11-13 04:56:38 +00:00 committed by apenwarr
commit 427deb199f

View file

@ -39,7 +39,7 @@ for dd in redo*.py; do
cat >install.wrapper <<-EOF cat >install.wrapper <<-EOF
#!/usr/bin/python #!/usr/bin/python
import sys, os; import sys, os;
exedir = os.path.dirname(os.path.abspath(sys.argv[0])) exedir = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0])))
sys.path.insert(0, os.path.join(exedir, '../lib/redo')) sys.path.insert(0, os.path.join(exedir, '../lib/redo'))
import $fix import $fix
EOF EOF