expoweb/scripts/old_or_unused/check-refs.sh
2022-10-26 00:16:59 +01:00

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">&nbsp;</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">&nbsp;</ul></div></body></html>" >>../expoweb/svx-refs.ok.html
if test -s svx-refs.err ; then true ; else rm svx-refs.err ; fi