mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Allow for recursive folder syncing
This commit is contained in:
@@ -160,7 +160,7 @@ def print_info(): # prints help text based on argument
|
|||||||
print('/ /')
|
print('/ /')
|
||||||
print('/ sshyp Copyright (C) 2021-2022 Randall Winkhart /')
|
print('/ sshyp Copyright (C) 2021-2022 Randall Winkhart /')
|
||||||
print('/ /')
|
print('/ /')
|
||||||
print('/ Version 2022.02.16.fr4.6 /')
|
print('/ Version 2022.02.16.fr4.7 /')
|
||||||
print('/ The High-Tech Shears Update /')
|
print('/ The High-Tech Shears Update /')
|
||||||
print('/ /')
|
print('/ /')
|
||||||
print('////////////////////////////////////////////////////////\n')
|
print('////////////////////////////////////////////////////////\n')
|
||||||
|
|||||||
+6
-5
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# external modules
|
# external modules
|
||||||
|
|
||||||
from os import remove, listdir
|
from os import listdir, remove, walk
|
||||||
from os.path import expanduser, isdir, join
|
from os.path import expanduser
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
|
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ def deletion_check(_client_device_name):
|
|||||||
|
|
||||||
def folder_check():
|
def folder_check():
|
||||||
open(expanduser('~/.config/sshyp/folder_database'), 'w').write('')
|
open(expanduser('~/.config/sshyp/folder_database'), 'w').write('')
|
||||||
for _file in listdir(expanduser('~/.password-pasture')):
|
for _root, _directories, _files in walk(expanduser('~/.password-pasture')):
|
||||||
if isdir(join('~/.config/sshyp/folder_database/', _file)):
|
for _dir in _directories:
|
||||||
open(expanduser('~/.config/sshyp/folder_database'), 'a').write(_file + '\n')
|
open(expanduser('~/.config/sshyp/folder_database'), 'a')\
|
||||||
|
.write(f"{_root.replace(expanduser('~/.password-pasture/'), '')}/{_dir}\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user