mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
I verified what Seth found in https://github.com/ansible/awx/pull/12052, but would really hate to lose this functionality. Curious if folks on the API team can try this and see if it works for them.
16 lines
372 B
Bash
Executable File
16 lines
372 B
Bash
Executable File
#!/bin/env bash
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage:"
|
|
echo " autoreload directory command"
|
|
exit 1
|
|
fi
|
|
|
|
inotifywait -mrq -e create,delete,attrib,close_write,move --exclude '/awx_devel/awx/ui' $1 | while read directory action file; do
|
|
if [[ "$file" =~ .*py$ ]]; then
|
|
echo "File changed: $file"
|
|
echo "Running command: $2"
|
|
eval $2
|
|
fi
|
|
done
|