2017-09-22 14:17:22 +02:00
|
|
|
#!/bin/bash
|
2018-05-15 21:46:37 +02:00
|
|
|
echo Downloading DMR-IDs from RadioID database
|
2018-06-04 13:54:16 +02:00
|
|
|
#curl 'https://www.ham-digital.org/status/users.csv' 2>/dev/null | sed -e 's/\t//g' | awk -F"," '/,/{gsub(/ /, "", $2); printf "%s;%s;%s\n", $1, $2, $3}' | sed -e 's/\(.\) .*/\1/g' > dmrids.dat
|
|
|
|
curl 'https://ham-digital.org/status/dmrid.dat' 2>/dev/null > dmrids.dat
|
2017-09-22 14:17:22 +02:00
|
|
|
|
|
|
|
echo Removing IDs from local database
|
|
|
|
echo -e 'delete from callsign where 1;' | sqlite3 callsigns.db
|
|
|
|
|
|
|
|
echo inserting new ID-list into local database
|
|
|
|
echo -e '.separator ";" \n.import dmrids.dat callsign' | sqlite3 callsigns.db
|
|
|
|
|