Actual forwarder program compiles apparently ok.
[userv-utils] / ipif / automechgen.sh
CommitLineData
84f87e82 1#!/bin/sh
2exec >automech.c.new
3exec 3>automech.h.new
4
5cat <<END
aaa9ab3a 6#include "forwarder.h"
84f87e82 7const struct mechanism *const mechanismlists[]= {
8END
9
10cat >&3 <<END
11#ifndef AUTOMECH_H
12#define AUTOMECH_H
13END
14
15for m in "$@"; do
16 echo " mechlist_$m,"
17 echo "extern const struct mechanism mechlist_$m[];" >&3
18done
19
20cat <<END
21 0
22};
23END
24
25cat >&3 <<END
26#endif
27END
28
29for e in c h; do mv -f automech.$e.new automech.$e; done