2016-04-27 12:13:12 +03:00
|
|
|
#!/usr/bin/env python3
|
2013-02-15 02:09:49 +04:00
|
|
|
import os, sys
|
|
|
|
|
2016-05-26 18:52:22 +03:00
|
|
|
_srcdir = '%s/src/' % os.path.dirname(os.path.realpath(__file__))
|
2015-11-12 18:11:05 +03:00
|
|
|
_filepath = os.path.dirname(sys.argv[0])
|
2014-07-21 04:39:40 +04:00
|
|
|
sys.path.insert(1, os.path.join(_filepath, _srcdir))
|
|
|
|
|
|
|
|
if sys.version_info[0] == 3:
|
|
|
|
import you_get
|
|
|
|
if __name__ == '__main__':
|
|
|
|
you_get.main(repo_path=_filepath)
|
2015-10-21 17:45:51 +03:00
|
|
|
else: # Python 2
|
2014-07-21 04:39:40 +04:00
|
|
|
from you_get.util import log
|
2015-10-21 17:45:51 +03:00
|
|
|
log.e("[fatal] Python 3 is required!")
|
|
|
|
log.wtf("try to run this script using 'python3 you-get'.")
|