From f9cb66b0a070eec5151adb1edc59634add7630d1 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 1 May 2017 00:24:08 +0300 Subject: [PATCH] Fix rename-project: fix only exiting files --- rename-project | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rename-project b/rename-project index 749ad6d..14f4103 100755 --- a/rename-project +++ b/rename-project @@ -16,7 +16,11 @@ fix_path() { } fix_files() { - replace "$old_name" "$new_name" "$@" + for file in "$@"; do + if [ -f "$file" ]; then + replace "$old_name" "$new_name" "$file" + fi + done } for project_dir in "$HOME"/prog/Python "$HOME"/current/projects \ -- 2.39.5