From a612c049422536786fde20b55470e933f0b521ae Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 27 Oct 2016 23:13:15 -0700 Subject: [PATCH] dont keep backups by default --- cedit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cedit b/cedit index e6d128d..9d37b55 100755 --- a/cedit +++ b/cedit @@ -25,13 +25,16 @@ section. Without SECTION_NAME, it acts on a global unnamed section. cedit is short for config edit. -v Verbose +-b Keep backup file -h|--help Help" local s diff name init local file_dir="$(dirname "$file")" local exists=true local verbose=false + local backup=false case $1 in + -b) backup=true; shift ;; -v) verbose=true; shift ;; -h|--help) echo "$help"; return ;; esac @@ -116,6 +119,9 @@ section. cedit is short for config edit. echo "$diff" fi fi + if ! $backup; then + rm -r $"$temp" + fi return $ret } cedit "$@" -- 2.30.2