Make autogen
This commit is contained in:
parent
9a00ee2118
commit
f36be74fe5
3 changed files with 35 additions and 16 deletions
1
acatcher/.gitignore
vendored
1
acatcher/.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
acatcher
|
acatcher
|
||||||
*.o
|
*.o
|
||||||
|
*.inc
|
||||||
HOSTS
|
HOSTS
|
||||||
SERVERIP
|
SERVERIP
|
||||||
|
|
|
@ -42,22 +42,22 @@ using namespace std;
|
||||||
const int MAX = 16;
|
const int MAX = 16;
|
||||||
|
|
||||||
const char *names[] = {
|
const char *names[] = {
|
||||||
"0",
|
"[0] mon-century-ab",
|
||||||
"1",
|
"[1] mon-century-cd",
|
||||||
"2",
|
"[2] mon-lajolla",
|
||||||
"3",
|
"[3] mon-carmel",
|
||||||
"4",
|
"[4] mon-losangeles-a",
|
||||||
"5",
|
"[5] mon-losangeles-b",
|
||||||
"6",
|
"[6] mon-losangeles-c",
|
||||||
"7",
|
"[7] mon-marina",
|
||||||
"8",
|
"[8] mon-belair",
|
||||||
"9",
|
"[9] mon-sanlorenzo-d",
|
||||||
"A",
|
"[a] mon-sanlorenzo-e",
|
||||||
"B",
|
"[b] mon-sanlorenzo-f",
|
||||||
"C",
|
"[c] mon-plaza-bc",
|
||||||
"D",
|
"[d] mon-plaza-d",
|
||||||
"E",
|
"[e] mon-internationallballroom",
|
||||||
"F",
|
"[f] mon-pacificballroom",
|
||||||
};
|
};
|
||||||
|
|
||||||
void cls()
|
void cls()
|
||||||
|
|
18
acatcher/mkacatcher
Executable file
18
acatcher/mkacatcher
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
NUM=0
|
||||||
|
while read FOO; do
|
||||||
|
if ! echo $FOO | grep -q ^#; then
|
||||||
|
HOST="`echo $FOO | cut -d\| -f3`"
|
||||||
|
MAC="`echo $FOO | cut -d\| -f1 | tr '[A-Z]' '[a-z]'`"
|
||||||
|
IP="`echo $FOO | cut -d\| -f2`"
|
||||||
|
if ! echo $HOST | egrep -q "(server|spare)"; then
|
||||||
|
>&2 echo found host $HOST mac $MAC ip $IP num $NUM
|
||||||
|
HEX="`echo "obase=16; $NUM" | bc | tr '[A-Z]' '[a-z]'`"
|
||||||
|
echo "\"[$HEX] $HOST\","
|
||||||
|
NUM=$((NUM+1))
|
||||||
|
elif echo $HOST | grep -q server; then
|
||||||
|
>&2 echo found server at ip $IP
|
||||||
|
echo $IP > SERVERIP
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < $HOME/Dropbox/CAMS > acatcher.cxx.inc
|
Loading…
Add table
Add a link
Reference in a new issue