Skip to content

Commit

Permalink
Update install.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Dec 8, 2023
1 parent ef4556f commit bcbb100
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
"""
HERE = os.path.dirname(__file__)
os.chdir(os.path.abspath(HERE))
HERE = os.path.dirname(__file__)
WWW = os.path.join(HERE, "www")


def _exe(cmd: str, check: bool = True, cwd: Optional[str] = None) -> None:
Expand Down Expand Up @@ -172,15 +170,16 @@ def main() -> int:
create_virtual_environment()
else:
print(f'{os.path.abspath("venv")} already exists')

if not os.path.exists(HERE, "activate.sh"):
# Is this necessary?
os.chdir(os.path.abspath(HERE))
if not os.path.exists("activate.sh"):
with open("activate.sh", encoding="utf-8", mode="w") as fd:
fd.write(_ACTIVATE_SH)
if sys.platform != "win32":
_exe("chmod +x activate.sh")
_exe("git add ./activate.sh --chmod=+x")

os.chdir(os.path.abspath(HERE))


# Linux/MacOS uses bin and Windows uses Script, so create
# a soft link in order to always refer to bin for all
Expand Down

0 comments on commit bcbb100

Please sign in to comment.