Add wrapper file renaming script

This commit is contained in:
Akemi Izuko 2022-12-19 20:24:04 -07:00
parent 025a2c457e
commit 98dd6df2eb
No known key found for this signature in database
GPG key ID: 905D444F6A5E4BE4

21
bin/rename_and_move.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
print_help() {
cat <<HELP
Moves the file to a more unix-friendly name
USAGE: $(basename "$0") <original-path>
See rename_for_shell.sh for more details on the renaming mechanics. Does not
work if the directory also has a bad name
EXAMPLES:
fd -x rename_and_move.sh
HELP
}
if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then
print_help
exit 1
else
mv -n "$@" "$(~/.configs_pointer/bin/rename_for_shell.sh "$@")" &>/dev/null
fi