diff --git a/.gitignore b/.gitignore index ad6d9373d..9f0baff67 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ aqt/forms locale .idea +tools/runanki.system diff --git a/Makefile b/Makefile index 3e0d2a30d..a1e127342 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ install: rm -rf ${DESTDIR}${PREFIX}/share/anki mkdir -p ${DESTDIR}${PREFIX}/share/anki cp -av * ${DESTDIR}${PREFIX}/share/anki/ + sed -e 's:@PREFIX@:${PREFIX}:' tools/runanki.system.in > tools/runanki.system + chmod 755 tools/runanki.system cd ${DESTDIR}${PREFIX}/share/anki && (\ mv tools/runanki.system ${DESTDIR}${PREFIX}/local/bin/anki;\ test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\ diff --git a/tools/runanki.system b/tools/runanki.system.in similarity index 59% rename from tools/runanki.system rename to tools/runanki.system.in index 786f6693e..9d39c3bbd 100755 --- a/tools/runanki.system +++ b/tools/runanki.system.in @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import sys -sys.path.append("/usr/share/anki") +sys.path.append("@PREFIX@/share/anki") import aqt aqt.run()