projects
/
PreCom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cb31bb
)
rsync adapter to make it play nice with dialog --gauge
author
Cameron Ball
<c.ball1729@gmail.com>
Fri, 5 Jun 2015 15:39:22 +0000
(23:39 +0800)
committer
Cameron Ball
<c.ball1729@gmail.com>
Fri, 5 Jun 2015 15:39:22 +0000
(23:39 +0800)
rsync-adapter.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/rsync-adapter.sh
b/rsync-adapter.sh
new file mode 100755
(executable)
index 0000000..
2d3e6f8
--- /dev/null
+++ b/
rsync-adapter.sh
@@ -0,0
+1,5
@@
+#!/bin/bash
+
+
+rsync --progress "$@" | tee >(grep -i ".sm" > /tmp/newsongs.txt) | mawk -Winteractive '{ if (index($0, "to-check=") > 0) { split($0, pieces, "to-check="); split(pieces[2], term, ")"); split(term[1], division, "/"); print (1-(division[1]/division[2]))*100 } }' \
+ | sed --unbuffered 's/\([0-9]*\).*/\1/'