mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
runanki.system: fix prefix at install time
Currently the Makefile lets you choose your own PREFIX, but the installed runanki.system always hardcodes the prefix as /usr. Fix runanki.system at install time to install into the designated PREFIX.
This commit is contained in:
parent
56e1643bfa
commit
4cee3807ff
3 changed files with 4 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
||||||
aqt/forms
|
aqt/forms
|
||||||
locale
|
locale
|
||||||
.idea
|
.idea
|
||||||
|
tools/runanki.system
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -9,6 +9,8 @@ install:
|
||||||
rm -rf ${DESTDIR}${PREFIX}/share/anki
|
rm -rf ${DESTDIR}${PREFIX}/share/anki
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/share/anki
|
mkdir -p ${DESTDIR}${PREFIX}/share/anki
|
||||||
cp -av * ${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 && (\
|
cd ${DESTDIR}${PREFIX}/share/anki && (\
|
||||||
mv tools/runanki.system ${DESTDIR}${PREFIX}/local/bin/anki;\
|
mv tools/runanki.system ${DESTDIR}${PREFIX}/local/bin/anki;\
|
||||||
test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\
|
test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.path.append("/usr/share/anki")
|
sys.path.append("@PREFIX@/share/anki")
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
aqt.run()
|
aqt.run()
|
Loading…
Reference in a new issue