From fed97bf8db8e364228baf27cc813bb9c03f77ba5 Mon Sep 17 00:00:00 2001 From: LeeW Date: Tue, 8 Sep 2015 20:50:38 +0800 Subject: [PATCH] Not to update list each time git-ignore-io is executed * Check whether the list exists. If not, get it. * Update should use -u option manually --- bin/git-ignore-io | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/git-ignore-io b/bin/git-ignore-io index 728b700..e6510e8 100755 --- a/bin/git-ignore-io +++ b/bin/git-ignore-io @@ -62,7 +62,13 @@ show_usage() { } -update_gi_list & +check_list_exist() { + if ! [ -f $default_path ]; then + update_gi_list & + fi +} + +check_list_exist if [[ $# -eq 0 ]]; then show_usage else