A simple, yet powerful tool for duplicating files. Think cp
, but more epic.
You can install dupl using deno install
or by downloading the portable binaries from the latest release page. Binaries are provided for Linux, Windows, and MacOS.
deno install --allow-read --allow-write --unstable --name dupl https://raw.githubusercontent.com/TheOtterlord/dupl/main/mod.ts
You can also just run it using deno run
.
deno run --allow-read --allow-write --unstable https://raw.githubusercontent.com/TheOtterlord/dupl/main/mod.ts . ../my_git_repo_2
Or add an alias to your terminal.
alias dupl='f(){ deno run --allow-read --allow-write --unstable https://raw.githubusercontent.com/TheOtterlord/dupl/main/mod.ts $@; unset -f f; }; f'
# To uninstall
unalias dupl
Use --help
to read about the options.
dupl --help
Dupl requires two main arguments. A source directory, and an output directory. The source directory is where it copies from, and the output directory is where it writes the copy.
If the output directory already exists, you'll be asked if you want to overwrite the directory. Doing this will DELETE all files in the directory.
# backup the current directory (e.g. `my_git_repo`)
dupl . ../my_git_repo_2
# using `deno run`
deno run --allow-read --allow-write --unstable https://raw.githubusercontent.com/TheOtterlord/dupl/main/mod.ts . ../my_git_repo_2
-h, --help
- Show the help message-i, --ignore
- Add additional globs to ignore--gitignore=true|false
- Ignore files in the .gitignore (default: true)-f, --force
- Ignore any prompts, including warnings about overwriting existing files/directories-v, --verbose
- Show all files before prompt.