libdart_openmvg/scripts/watch_compilelib.sh
2024-03-11 18:09:11 -07:00

14 lines
408 B
Bash
Executable File

#!/bin/bash
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
done
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SRC_DIR=$(realpath ${DIR}/../src)
find ${SRC_DIR} -name "*.c*" -o -name "*.h" -o -name "CMakeLists.txt" | \
entr -r ${DIR}/compilelib.sh