change run-web.sh to restart to pkg/ changes

This commit is contained in:
Guilherme Rugai Freire 2024-03-19 11:30:10 -03:00
parent 5e0e362e47
commit f547eb161e
No known key found for this signature in database
GPG Key ID: AC1D9B6E48E16AC1

View File

@ -1,10 +1,9 @@
#!/bin/sh
watch_dir="cmd/web_server"
pid=0
get_ts() {
stat "$watch_dir" | grep Modify | awk '{$1=""; print $0}' | sed 's/^ //g'
stat cmd/web_server pkg/** | grep Modify | awk '{$1=""; print $0}' | sed 's/^ //g' | sort -r | head -1
}
run_server() {