mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-22 23:31:56 +00:00
28 lines
1.1 KiB
Bash
28 lines
1.1 KiB
Bash
|
#!/bin/sh
|
||
|
# Checks that *ref in .svx files link to valid surveyscans folders
|
||
|
# Assumes that svx-refs has been generated.
|
||
|
# usage:
|
||
|
# cd /loser/
|
||
|
# ./check-refs.sh
|
||
|
#
|
||
|
# 2020-04-06 Philip Sargent
|
||
|
#
|
||
|
# To make this run in a cron job on the server, we need to do:
|
||
|
# 1. make the paths correct for the server in chk-refs.sh
|
||
|
#
|
||
|
# 2020-04-13
|
||
|
#
|
||
|
awk -f check-refs.awk svx-refs
|
||
|
sort < ok.tmp > svx-refs.ok
|
||
|
rm ok.tmp
|
||
|
sort < svx-refs.tmp > svx-refs.err
|
||
|
rm svx-refs.tmp
|
||
|
echo "<html><head><meta name="keywords" content="NOEDIT"></head><body><pre>" >../expoweb/svx-refs.err.html
|
||
|
cat svx-refs.err >>../expoweb/svx-refs.err.html
|
||
|
echo "</pre><div id="menu"><ul id="links"> </ul></div></body></html>" >>../expoweb/svx-refs.err.html
|
||
|
echo "<html><head><meta name="keywords" content="NOEDIT"></head><body><pre>" >../expoweb/svx-refs.ok.html
|
||
|
cat svx-refs.ok >>../expoweb/svx-refs.ok.html
|
||
|
echo "</pre><div id="menu"><ul id="links"> </ul></div></body></html>" >>../expoweb/svx-refs.ok.html
|
||
|
|
||
|
if test -s svx-refs.err ; then true ; else rm svx-refs.err ; fi
|