Add rsync_clone script.
This commit is contained in:
@@ -19,6 +19,7 @@ let
|
|||||||
patchScriptBin "git_find_merged_branches" (builtins.readFile ./files/git_find_merged_branches.bash)
|
patchScriptBin "git_find_merged_branches" (builtins.readFile ./files/git_find_merged_branches.bash)
|
||||||
);
|
);
|
||||||
git_fix_author = (patchScriptBin "git_fix_author" (builtins.readFile ./files/git_fix_author.bash));
|
git_fix_author = (patchScriptBin "git_fix_author" (builtins.readFile ./files/git_fix_author.bash));
|
||||||
|
rsync_clone = (patchScriptBin "rsync_clone" (builtins.readFile ./files/rsync_clone.bash));
|
||||||
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
||||||
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
||||||
'';
|
'';
|
||||||
@@ -69,6 +70,7 @@ in
|
|||||||
inetutils # For whois
|
inetutils # For whois
|
||||||
git_find_merged_branches
|
git_find_merged_branches
|
||||||
git_fix_author
|
git_fix_author
|
||||||
|
rsync_clone
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
8
nix/configuration/roles/base/files/rsync_clone.bash
Normal file
8
nix/configuration/roles/base/files/rsync_clone.bash
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Wrapper to set rsync flags for cloning a folder preserving attributes
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
exec rsync -aHAXS "$@"
|
||||||
Reference in New Issue
Block a user