mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-06-06 01:31:15 -04:00
feat: symlink script for macOSMonterey
svg files
This commit is contained in:
parent
f3d7103bec
commit
a5b08707d8
2 changed files with 28 additions and 0 deletions
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- pling docs: size and support info updated
|
- pling docs: size and support info updated
|
||||||
- `bigsur` cursor bitmapper as node package
|
- `bigsur` cursor bitmapper as node package
|
||||||
- New commands added inside `Makefile` for `bitmapper`
|
- New commands added inside `Makefile` for `bitmapper`
|
||||||
|
- symlink script for `macOSMonterey` svg files
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
27
svg/link.py
Normal file
27
svg/link.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import os
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
|
ignore_files = ["center_ptr.svg", "context-menu.svg", "left_ptr.svg", "right_ptr.svg"]
|
||||||
|
|
||||||
|
|
||||||
|
def link_svg_dir(src_dir, dst_dir) -> None:
|
||||||
|
for src_path in glob(f"{src_dir}/*"):
|
||||||
|
file_name = os.path.basename(src_path)
|
||||||
|
if file_name not in ignore_files:
|
||||||
|
dst = os.path.join(dst_dir, file_name)
|
||||||
|
if os.path.exists(dst):
|
||||||
|
print(f"Removing old symlink of '{file_name}'")
|
||||||
|
os.remove(dst)
|
||||||
|
print(f"Creating symlink of '{file_name}'")
|
||||||
|
os.symlink(
|
||||||
|
os.path.relpath(src_path, f"{dst_dir}/"),
|
||||||
|
dst,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
print(f"Ignoring file '{file_name}'")
|
||||||
|
|
||||||
|
|
||||||
|
link_svg_dir("bigsur/static", "monterey/static")
|
||||||
|
link_svg_dir("bigsur/animated", "monterey/animated")
|
Loading…
Add table
Add a link
Reference in a new issue