File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function targz() {
3535
3636 size=$(
3737 stat -f" %z" " ${tmpFile} " 2> /dev/null; # OS X `stat`
38- stat -c" %s" " ${tmpFile} " 2> /dev/null # GNU `stat`
38+ stat -c" %s" " ${tmpFile} " 2> /dev/null; # GNU `stat`
3939 ) ;
4040
4141 local cmd=" " ;
@@ -50,10 +50,16 @@ function targz() {
5050 fi ;
5151 fi ;
5252
53- echo " Compressing .tar using \` ${cmd} \` …" ;
53+ echo " Compressing .tar ( $(( size / 1000 )) kB) using \` ${cmd} \` …" ;
5454 " ${cmd} " -v " ${tmpFile} " || return 1;
5555 [ -f " ${tmpFile} " ] && rm " ${tmpFile} " ;
56- echo " ${tmpFile} .gz created successfully." ;
56+
57+ zippedSize=$(
58+ stat -f" %z" " ${tmpFile} .gz" 2> /dev/null; # OS X `stat`
59+ stat -c" %s" " ${tmpFile} .gz" 2> /dev/null; # GNU `stat`
60+ ) ;
61+
62+ echo " ${tmpFile} .gz ($(( zippedSize / 1000 )) kB) created successfully." ;
5763}
5864
5965# Determine size of a file or total size of a directory
You can’t perform that action at this time.
0 commit comments