-#!/usr/bin/python3
+#!/usr/bin/env python3
# This script takes a manpage written in markdown and turns it into an html web
# page and a nroff man page. The input file must have the name of the program
-#!/usr/bin/python3 -B
+#!/usr/bin/env python3 -B
# This script turns one or more diff files in the patches dir (which is
# expected to be a checkout of the rsync-patches git repo) into a branch
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script outputs some perl code that parses all possible options
# that the code in options.c might send to the server. This perl code
# is included in the rrsync script.
-#!/usr/bin/python3
+#!/usr/bin/env python3
# Copyright (C) 2020 Wayne Davison
#
-#!/usr/bin/python3 -B
+#!/usr/bin/env python3 -B
# This script expects the directory ~/samba-rsync-ftp to exist and to be a
# copy of the /home/ftp/pub/rsync dir on samba.org. It also requires a
-#!/usr/bin/python3 -B
+#!/usr/bin/env python3 -B
# This script is used to turn one or more of the "patch/BASE/*" branches
# into one or more diffs in the "patches" directory. Pass the option
-#!/usr/bin/python3 -B
+#!/usr/bin/env python3 -B
# This script expects the directory ~/samba-rsync-ftp to exist and to be a
# copy of the /home/ftp/pub/rsync dir on samba.org. When the script is done,
-#!/usr/bin/python3 -B
+#!/usr/bin/env python3 -B
# This script checks the *.c files for extraneous "extern" variables,
# for vars that are defined but not used, and for inconsistent array
-#!/usr/bin/python3
+#!/usr/bin/env python3
# This uses the output from "support/git-set-file-times --list" to discern
# the last-modified year of each *.c & *.h file and updates the copyright
-#!/bin/bash
+#!/usr/bin/env bash
# This script uses openssl, gnutls, or stunnel to secure an rsync daemon connection.
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# This script lets you update a hierarchy of files in an atomic way by
# first creating a new hierarchy using rsync's --link-dest option, and
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# 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
-#!/bin/bash
+#!/usr/bin/env bash
# Send an error message via the rsync-protocol to a non-daemon client rsync.
#
# Usage: deny-rsync "message"
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script will parse the output of "find ARG [ARG...] -ls" and
# apply (at your discretion) the permissions, owner, and group info
# it reads onto any existing files and dirs (it doesn't try to affect
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script takes an input of filenames and outputs a set of
# include/exclude directives that can be used by rsync to copy
# just the indicated files using an --exclude-from=FILE option.
-#!/usr/bin/python3
+#!/usr/bin/env python3
import os, re, argparse, subprocess
from datetime import datetime
-#!/bin/bash
+#!/usr/bin/env bash
# instant-rsyncd lets you quickly set up and start a simple, unprivileged rsync
# daemon with a single module in the current directory. I've found it
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Filter the rsync daemon log messages by module name. The log file can be
# in either syslog format or rsync's own log-file format. Note that the
# MODULE_NAME parameter is used in a regular-expression match in order to
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script can be used as a "remote shell" command that is only
# capable of pretending to connect to "localhost". This is useful
# for testing or for running a local copy where the sender and the
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This helper script makes it easy to use a passwd or group file to map
# values in a LOCAL transfer. For instance, if you mount a backup that
# does not have the same passwd setup as the local machine, you can do
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This helper script makes it easy to use a passwd or group file to map
# values in a LOCAL transfer. For instance, if you mount a backup that
# does not have the same passwd setup as the local machine, you can do
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script takes a command-line arg of a source directory
# that will be passed to rsync, and generates a set of excludes
# that will exclude all mount points from the list. This is
-#!/usr/bin/perl
+#!/usr/bin/env perl
# This script will either prefix all symlink values with the string
# "/rsyncd-munged/" or remove that prefix.
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Name: /usr/local/bin/rrsync (should also have a symlink in /usr/bin)
# Purpose: Restricts rsync to subdirectory declared in .ssh/authorized_keys
# Author: Joe Smith <js-cgi@inwap.com> 30-Sep-2004
-#!/bin/bash
+#!/usr/bin/env bash
IGNOREEXIT=24
IGNOREOUT='^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
-#!/bin/bash
+#!/usr/bin/env bash
# This script can be used as an rsync command-line filter that strips a single
# trailing slash from each arg. That treats "src/" the same as "src", thus
# you need to use "src/." or "src//" for just the contents of the "src" dir.
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# This script parses the default logfile format produced by rsync when running
# as a daemon with transfer logging enabled. It also parses a slightly tweaked
-#! /usr/bin/python2.2
+#!/usr/bin/env python2
# Copyright (C) 2002 by Martin Pool <mbp@samba.org>