diff --git a/sharelatex-git b/sharelatex-git index 12c615b..9b4b2cc 120000 --- a/sharelatex-git +++ b/sharelatex-git @@ -1 +1 @@ -sharelatex-git.py \ No newline at end of file +sharelatex_git.py \ No newline at end of file diff --git a/sharelatex-git.py b/sharelatex_git.py old mode 100755 new mode 100644 similarity index 98% rename from sharelatex-git.py rename to sharelatex_git.py index b761d38..d707360 --- a/sharelatex-git.py +++ b/sharelatex_git.py @@ -146,7 +146,7 @@ def write_if_not_there(s): if s not in lines: f.write(s + '\n') - write_if_not_there('sharelatex-git.py') + write_if_not_there('sharelatex_git.py') write_if_not_there('sharelatex-git') write_if_not_there('.sharelatex-git') except: @@ -196,7 +196,9 @@ def commit_all_changes(message, title): #------------------------------------------------------------------------------ def files_changed(): out = run_cmd('git status .').decode('utf-8') - return 'nothing to commit, working directory clean' not in out.lower() + return ('nothing to commit, working directory clean' not in out.lower() + and + 'nothing to commit, working tree clean' not in out.lower()) #------------------------------------------------------------------------------ # Download the sharelatex project and extract it. Die out if there's any @@ -435,4 +437,5 @@ def parse_input(): #------------------------------------------------------------------------------ # Go, go, go! #------------------------------------------------------------------------------ -go(*parse_input()) +if __name__ == '__main__': + go(*parse_input())