chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
348c6a1
)
Support calling of 'fdroid init' from other places
author
Daniel Martí
<mvdan@mvdan.cc>
Mon, 30 Jun 2014 17:38:38 +0000
(19:38 +0200)
committer
Daniel Martí
<mvdan@mvdan.cc>
Mon, 30 Jun 2014 17:38:38 +0000
(19:38 +0200)
e.g. from a symlink to fdroid or from a script. Also more reliable in other
cases where argv[0] is not what we want.
fdroidserver/init.py
patch
|
blob
|
history
diff --git
a/fdroidserver/init.py
b/fdroidserver/init.py
index f55549ab4bb73591e47b65cbe8588201dc66917a..3a40eada711a563fb7a4d2c970beeb84878b79e1 100644
(file)
--- a/
fdroidserver/init.py
+++ b/
fdroidserver/init.py
@@
-112,7
+112,7
@@
def main():
(options, args) = parser.parse_args()
# find root install prefix
- tmp = os.path.
dirname(sys.argv[0]
)
+ tmp = os.path.
normpath(os.path.join(os.path.dirname(__file__), '..')
)
if os.path.basename(tmp) == 'bin':
prefix = os.path.dirname(tmp)
examplesdir = prefix + '/share/doc/fdroidserver/examples'