Remove forgotten $rcs_id variable after the svn → git conversion
[gpstools.git] / branches / gpst.gpxfix / gpslist
blob7ec03b697c087bd72cd33862addc97de6c684263
1 #!/bin/bash
3 #=======================================================================
4 # $Id$
5 # File ID: 9cf16956-fafa-11dd-9073-000475e441b9
6 # Read GPS data from stdin or file names at the command line and send a
7 # PostgreSQL table to stdout. Needs a database called "tmpgps" with the
8 # usual tables.
9 #=======================================================================
11 cat "$@" | gpst -o pgtab | psql -c "TRUNCATE logg; COPY logg FROM stdin;" tmpgps >/dev/null 2>&1
12 cd ~/bin/src/gpstools/postgres
13 psql -f "$HOME/bin/src/gpstools/postgres/allupdate.sql" tmpgps >/dev/null 2>&1
14 psql -f "$HOME/bin/src/gpstools/postgres/distupdate.sql" tmpgps >/dev/null 2>&1
15 psql -c "SELECT date as date, coor, name, dist FROM logg ORDER BY date;" tmpgps