sane-scripts: sane-dev-cargo-loop: add tput reset
between runs
This commit is contained in:
parent
9ed4a13a6f
commit
56036b13c3
|
@ -24,6 +24,7 @@ resholve.mkDerivation {
|
||||||
gnugrep
|
gnugrep
|
||||||
ifuse
|
ifuse
|
||||||
inotifyTools
|
inotifyTools
|
||||||
|
ncurses
|
||||||
oath-toolkit
|
oath-toolkit
|
||||||
openssh
|
openssh
|
||||||
rmlint
|
rmlint
|
||||||
|
|
|
@ -5,13 +5,26 @@
|
||||||
external_cmd="cargo build --all"
|
external_cmd="cargo build --all"
|
||||||
if [ "x$1" != "x" ]
|
if [ "x$1" != "x" ]
|
||||||
then
|
then
|
||||||
external_cmd=$1
|
external_cmd=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inotifywait -mr \
|
# run this once before starting the inotify
|
||||||
|
$external_cmd
|
||||||
|
|
||||||
|
# other interesting commands to monitor:
|
||||||
|
# - -e move
|
||||||
|
# - -e create
|
||||||
|
# - -e delete
|
||||||
|
# - -e close_write
|
||||||
|
# but most (except close_write) seem to cause multiple events per vim :w
|
||||||
|
# TODO: consider using watchman: https://facebook.github.io/watchman/
|
||||||
|
# - watchman waits for the root to settle before invoking my command
|
||||||
|
# so, fewer runs
|
||||||
|
inotifywait --monitor --recursive \
|
||||||
--timefmt '%d/%m/%y %H:%M' --format '%T %w %f' \
|
--timefmt '%d/%m/%y %H:%M' --format '%T %w %f' \
|
||||||
-e close_write ./ |
|
-e modify ./ |
|
||||||
while read -r date time dir file
|
while read -r date time dir file
|
||||||
do
|
do
|
||||||
$external_cmd
|
tput reset
|
||||||
|
$external_cmd
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user