dotly
dotly copied to clipboard
dotfiles backup fails on "dotly/restorer"
"dotly/restorer" fails on dotfiles backup because calls create_dotfiles_dir
instead of backup_dotfiles_dir
{βΈ} ~ bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)
ββββββββββββββββββββββββββββββββββββββ
~ β π Welcome to the dotly restorer! β ~
ββββββββββββββββββββββββββββββββββββββ
Checking if Git is installed
> Git command exists on this system
> Curl command exists on this system
π€ Where do you want your dotfiles to be located? (default ~/.dotfiles) :
π€ π Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n] : Y
/dev/fd/11: lΓnea 194: create_dotfiles_dir: orden no encontrada
Current code:
# Backup if currently there are any dotfiles and prepare parent directory
if [[ -d "$DOTFILES_PATH" ]] && ! ${continue:-}; then
_q "π Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n]" "PROMPT_REPLY"
[[ "${PROMPT_REPLY:-Y}" =~ ^[Yy] ]] && create_dotfiles_dir "$DOTFILES_PATH"
fi
Fixed code:
# Backup if currently there are any dotfiles and prepare parent directory
if [[ -d "$DOTFILES_PATH" ]] && ! ${continue:-}; then
_q "π Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n]" "PROMPT_REPLY"
[[ "${PROMPT_REPLY:-Y}" =~ ^[Yy] ]] && backup_dotfiles_dir "$DOTFILES_PATH"
fi