File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -3951,11 +3951,14 @@ class RepoFilter(object):
3951
3951
print (_ ("Completely finished after {:.2f} seconds." )
3952
3952
.format (time .time ()- start ))
3953
3953
3954
- if __name__ == '__main__' :
3954
+ def main () :
3955
3955
setup_gettext ()
3956
3956
args = FilteringOptions .parse_args (sys .argv [1 :])
3957
3957
if args .analyze :
3958
3958
RepoAnalyze .run (args )
3959
3959
else :
3960
3960
filter = RepoFilter (args )
3961
3961
filter .run ()
3962
+
3963
+ if __name__ == '__main__' :
3964
+ main ()
Original file line number Diff line number Diff line change 1
1
from setuptools import setup
2
2
import os
3
- for f in ['git-filter-repo' , 'git_filter_repo.py' , 'README.md' ]:
3
+
4
+
5
+ def link_parent (src , target = None ):
6
+ if target is None :
7
+ target = src
4
8
try :
5
- os .symlink ("../" + f , f )
9
+ os .symlink (os . path . join ( ".." , src ), target )
6
10
except FileExistsError :
7
11
pass
8
- setup (use_scm_version = dict (root = ".." , relative_to = __file__ ))
12
+
13
+
14
+ for f in ['git-filter-repo' , 'README.md' ]:
15
+ link_parent (f )
16
+
17
+ link_parent ('git-filter-repo' , 'git_filter_repo.py' )
18
+
19
+
20
+ setup (use_scm_version = dict (root = ".." , relative_to = __file__ ),
21
+ entry_points = {'console_scripts' : ['git-filter-repo = git_filter_repo:main' ]})
You can’t perform that action at this time.
0 commit comments