__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
#!/usr/bin/python3
# This script finds all CVS/Entries files in the current directory and below
# and creates a local .cvsinclude file with non-inherited rules including each
# checked-in file.  Then, use this option whenever using --cvs-exclude (-C):
#
#    -f ': .cvsinclude'
#
# That ensures that all checked-in files/dirs are included in the transfer.
# (You could alternately put ": .cvsinclude" into an .rsync-filter file and
# use the -F option, which is easier to type.)
#
# The downside is that you need to remember to re-run cvs2includes whenever
# CVS gets an added or removed file. Maybe just run it before every copy.

import os, argparse

INC_NAME = '.cvsinclude'

def main():
    if args.dir:
        os.chdir(args.dir)

    cvs_includes = set()
    for root, dirs, files in os.walk('.'):
        if INC_NAME in files:
            cvs_includes.add((root + '/' + INC_NAME)[2:])
        if root.endswith('/CVS') and 'Entries' in files:
            entries = root[2:] + '/Entries'
            includes = [ ]
            with open(entries) as fh:
                for line in fh:
                    if line.startswith(('/', 'D/')):
                        includes.append(line.split('/', 2)[1])
            if includes:
                inc = root[2:-3] + INC_NAME
                cvs_includes.discard(inc)
                try:
                    with open(inc) as fh:
                        old_txt = fh.read()
                except OSError:
                    old_txt = ''
                txt = ''.join(f"+ /{x}\n" for x in includes)
                if txt == old_txt:
                    print("Unchanged", inc)
                else:
                    print("Updating", inc)
                    with open(inc, 'w') as fh:
                        fh.write(txt)
        dirs.sort()

    for inc in sorted(cvs_includes):
        print("Removing", inc)
        os.unlink(inc)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=f"Transform CVS/Entries into {INC_NAME} files.", add_help=False)
    parser.add_argument("--help", "-h", action="help", help="Output this help message and exit.")
    parser.add_argument("dir", nargs='?', help="The top CVS dir. Defaults to the current directory.")
    args = parser.parse_args()
    main()

# vim: sw=4 et

Filemanager

Name Type Size Permission Actions
atomic-rsync File 5.06 KB 0755
cull-options File 4.78 KB 0755
cvs2includes File 2.24 KB 0755
file-attr-restore File 4.82 KB 0755
files-to-excludes File 1.4 KB 0755
git-set-file-times File 3.81 KB 0755
logfilter File 1.07 KB 0755
lsh File 3.03 KB 0755
mnt-excl File 2.41 KB 0755
munge-symlinks File 2.55 KB 0755
rsync-no-vanished File 585 B 0755
rsyncstats File 8.48 KB 0755
Filemanager