21
21
# - Fully test and re-enable disperse ✓
22
22
# - Add README.MD with usage instructions ✓
23
23
# - Add check in undo if exiting same as undo ✓
24
- # - Better indication when no changes to gathered files have occurred
24
+ # - Better indication when no changes to gathered files have occurred (ID0)
25
25
# - Maybe more granular disperse as option? Next ver. maybe
26
26
# - Implement disperse diff-only? Next ver. maybe
27
27
@@ -66,6 +66,7 @@ class GatherException(Exception):
66
66
67
67
# Util. funcs.
68
68
def mkdir_or_existing (directory_path ):
69
+ print ('Directory is:' , directory_path )
69
70
try :
70
71
os .makedirs (directory_path )
71
72
except FileExistsError :
@@ -291,9 +292,13 @@ def disperse_dotfiles(directory):
291
292
292
293
print_aligned (f'Source >> ' , source_file_path , [('Target >> ' , target_file_path )])
293
294
294
- if not git_diff (source_file_path , target_file_path ):
295
- print ('These two files are the same, skipping dispersal. ♻️' )
296
- continue
295
+ print (target_file_path )
296
+
297
+ # TODO: (ID0)(Hristo)When dispersing to new machines this check was not working out and needs
298
+ # to be fixed eventually for now doing the redundant work is fine
299
+ # if not git_diff(source_file_path, target_file_path):
300
+ # print('These two files are the same, skipping dispersal. ♻️')
301
+ # continue
297
302
298
303
# Check if a file already exist in target location and backup for undo
299
304
if target_exists :
@@ -315,6 +320,8 @@ def disperse_dotfiles(directory):
315
320
print_center ('Created undo for 💾' )
316
321
317
322
# Copy repo dotfile to target location
323
+ new_dir , _ = split_path_dir_file (target_file_path )
324
+ mkdir_or_existing (new_dir )
318
325
shutil .copy (source_file_path , target_file_path )
319
326
files_dispersed += 1
320
327
print ('File dispersed. 🌱' )
0 commit comments