File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,14 @@ colorPrint() {
3737 shift
3838
3939 colorEcho " $color " " $@ "
40- # use "{} &> /dev/null" to discard bash error message:
41- # line 42: xxx.log: Permission denied
42- {
43- [ -n " $append_file " ] && echo " $@ " >> " $append_file "
44- [ -n " $store_dir " ] && echo " $@ " >> " ${store_file_prefix} $PROG "
45- } & > /dev/null
40+ [ -n " $append_file " -a -w " $append_file " ] && echo " $@ " >> " $append_file "
41+ [ -n " $store_dir " -a -w " $store_dir " ] && echo " $@ " >> " ${store_file_prefix} $PROG "
42+ }
43+
44+ normalPrint () {
45+ echo " $@ "
46+ [ -n " $append_file " -a -w " $append_file " ] && echo " $@ " >> " $append_file "
47+ [ -n " $store_dir " -a -w " $store_dir " ] && echo " $@ " >> " ${store_file_prefix} $PROG "
4648}
4749
4850redPrint () {
@@ -61,12 +63,6 @@ bluePrint() {
6163 colorPrint 36 " $@ "
6264}
6365
64- normalPrint () {
65- echo " $@ "
66- [ -n " $append_file " ] && echo " $@ " >> " $append_file "
67- [ -n " $store_dir " ] && echo " $@ " >> " ${store_file_prefix} $PROG "
68- }
69-
7066die () {
7167 redPrint " Error: $@ " 1>&2
7268 exit 1
You can’t perform that action at this time.
0 commit comments