mirror of
https://github.com/cheat/cheat.git
synced 2025-09-03 18:48:29 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f128167311 | |||
74a91aa1d4 | |||
f0cbc2df7b | |||
377da479e6 | |||
2f56270ded |
@ -38,7 +38,7 @@ from docopt import docopt
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# parse the command-line options
|
# parse the command-line options
|
||||||
options = docopt(__doc__, version='cheat 2.0.1')
|
options = docopt(__doc__, version='cheat 2.0.3')
|
||||||
|
|
||||||
# list directories
|
# list directories
|
||||||
if options['--directories']:
|
if options['--directories']:
|
||||||
|
@ -9,7 +9,7 @@ def default_path():
|
|||||||
# the default path becomes confused when cheat is run as root, so fail
|
# the default path becomes confused when cheat is run as root, so fail
|
||||||
# under those circumstances. (There is no good reason to need to run cheat
|
# under those circumstances. (There is no good reason to need to run cheat
|
||||||
# as root.)
|
# as root.)
|
||||||
if os.geteuid() == 0:
|
if os.name != 'nt' and os.geteuid() == 0:
|
||||||
die('Please do not run this application as root.');
|
die('Please do not run this application as root.');
|
||||||
|
|
||||||
# determine the default cheatsheet dir
|
# determine the default cheatsheet dir
|
||||||
|
17
setup.py
17
setup.py
@ -1,9 +1,18 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
data = [
|
||||||
|
('/usr/share/zsh/site-functions', ['cheat/autocompletion/_cheat.zsh']),
|
||||||
|
('/etc/bash_completion.d' , ['cheat/autocompletion/cheat.bash']),
|
||||||
|
('/usr/share/fish/completions' , ['cheat/autocompletion/cheat.fish'])
|
||||||
|
]
|
||||||
|
|
||||||
|
if os.name == 'nt':
|
||||||
|
data = []
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'cheat',
|
name = 'cheat',
|
||||||
version = '2.0.1',
|
version = '2.0.3',
|
||||||
author = 'Chris Lane',
|
author = 'Chris Lane',
|
||||||
author_email = 'chris@chris-allen-lane.com',
|
author_email = 'chris@chris-allen-lane.com',
|
||||||
license = 'GPL3',
|
license = 'GPL3',
|
||||||
@ -21,11 +30,7 @@ setup(
|
|||||||
'cheat.cheatsheets': [f for f in os.listdir('cheat/cheatsheets') if '.' not in f]
|
'cheat.cheatsheets': [f for f in os.listdir('cheat/cheatsheets') if '.' not in f]
|
||||||
},
|
},
|
||||||
scripts = ['bin/cheat'],
|
scripts = ['bin/cheat'],
|
||||||
data_files = [
|
data_files = data,
|
||||||
('/usr/share/zsh/site-functions', ['cheat/autocompletion/_cheat.zsh']),
|
|
||||||
('/etc/bash_completion.d' , ['cheat/autocompletion/cheat.bash']),
|
|
||||||
('/usr/share/fish/completions' , ['cheat/autocompletion/cheat.fish'])
|
|
||||||
],
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'docopt >= 0.6.1',
|
'docopt >= 0.6.1',
|
||||||
'pygments >= 1.6.0',
|
'pygments >= 1.6.0',
|
||||||
|
Reference in New Issue
Block a user