mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-25 09:36:24 -07:00
Don't fail installation if we find a symlink
This commit is contained in:
parent
eda67081fa
commit
2e3cfcc30d
1 changed files with 13 additions and 10 deletions
23
build.py
23
build.py
|
@ -325,16 +325,19 @@ def install(prefix="/usr", document_root="/srv/gochan", symlinks=False, js_only=
|
|||
mkdir("/var/log/gochan")
|
||||
|
||||
for file in release_files:
|
||||
if file.startswith("html/"):
|
||||
trimmed = path.relpath(file, "html/")
|
||||
os.chdir(path.join(start_dir, "html/"))
|
||||
print("copying", trimmed,"to", path.join(document_root, trimmed))
|
||||
copy(trimmed, document_root)
|
||||
os.chdir(start_dir)
|
||||
else:
|
||||
os.chdir(start_dir)
|
||||
copy(file, path.join(prefix, "share/gochan"))
|
||||
mkdir(path.join(prefix, "share/gochan/templates/override/"))
|
||||
try:
|
||||
if file.startswith("html/"):
|
||||
trimmed = path.relpath(file, "html/")
|
||||
os.chdir(path.join(start_dir, "html/"))
|
||||
print("copying", trimmed,"to", path.join(document_root, trimmed))
|
||||
copy(trimmed, document_root)
|
||||
os.chdir(start_dir)
|
||||
else:
|
||||
os.chdir(start_dir)
|
||||
copy(file, path.join(prefix, "share/gochan"))
|
||||
mkdir(path.join(prefix, "share/gochan/templates/override/"))
|
||||
except shutil.SameFileError as err:
|
||||
print(err)
|
||||
|
||||
if path.exists(gochan_exe) is False:
|
||||
build()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue