mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-04-28 05:02:26 +00:00
Use os instead of redundant definitions in lib.Path
This commit is contained in:
parent
32dce7de6d
commit
0a3665483f
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
from lib import Input, Print, Install, Path
|
from lib import Input, Print, Install, Path
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
def make_backup(backup_floder):
|
def make_backup(backup_floder):
|
||||||
|
@ -33,7 +34,7 @@ def personalized_changes(file):
|
||||||
|
|
||||||
def init(symlink):
|
def init(symlink):
|
||||||
# Get path to files/ floder (contains all dotfiles)
|
# Get path to files/ floder (contains all dotfiles)
|
||||||
files_dir = Path.join_paths(
|
files_dir = os.path.join(
|
||||||
Path.get_parent(__file__), 'files')
|
Path.get_parent(__file__), 'files')
|
||||||
# Create optional backup
|
# Create optional backup
|
||||||
make_backup(files_dir)
|
make_backup(files_dir)
|
||||||
|
@ -42,7 +43,7 @@ def init(symlink):
|
||||||
# Make personalized changes to files
|
# Make personalized changes to files
|
||||||
personalized_changes(file)
|
personalized_changes(file)
|
||||||
# Set symlink position ($HOME/filepath)
|
# Set symlink position ($HOME/filepath)
|
||||||
position = Path.join_paths(
|
position = os.path.join(
|
||||||
Path.get_home(), file.replace(f'{files_dir}/', ''))
|
Path.get_home(), file.replace(f'{files_dir}/', ''))
|
||||||
|
|
||||||
if symlink:
|
if symlink:
|
||||||
|
|
Loading…
Add table
Reference in a new issue