File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
"""Django's command-line utility for administrative tasks."""
3
3
import os
4
+ from os import path
4
5
import sys
5
6
6
7
from helper import *
7
8
8
9
def init_sherlock ():
9
10
"""Get the newest Sherlock project."""
10
11
print ("[INFO] Prepare for Sherlock Project.." )
11
- os .system (f"git clone https://github.com/sherlock-project/sherlock { sherlock_dir ()} " );
12
- cmd_in_dir (sherlock_dir (), f"git pull" ) # Update to the newest version
12
+ if path .exists (sherlock_dir ()):
13
+ cmd_in_dir (sherlock_dir (), f"git pull" ) # Update to the newest version
14
+ else : # Othersie, clone it once
15
+ os .system (f"git clone https://github.com/sherlock-project/sherlock { sherlock_dir ()} " );
13
16
os .system (f"{ py_command ()} -m pip install -r { sherlock_dir ()} /requirements.txt" )
14
17
os .system (f"{ py_command ()} { sherlock_dir ()} /sherlock --version" )
15
18
You can’t perform that action at this time.
0 commit comments