summaryrefslogtreecommitdiff
path: root/www/upload
blob: 4cf8447cbd92455abe371edf9f77c2f7c11e4570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh 
#
# Upload gpsd website contents.
# Plesase do not introduce bashims into this script.
#
# No CGI copy yet, hosting site won't let us send mail
#
webdir=shell.berlios.de:/home/groups/gpsd/htdocs
#cgidir=shell.berlios.de:/home/groups/gpsd/cgi-bin

# Ensure all derived HTML and checksums are up to date.
(cd ..; scons website)


if [ $1 ]
then
    for f in $*; do scp $f $webdir/$f; done
else
    eligible=`ls *.html *.png *.gif *.css *.js *.txt \
	performance/*.html performance/*.txt performance/*.png \
	../TODO ../NEWS`
    if [ -e .upload-stamp ]
    then
	eligible=`find $eligible -newer .upload-stamp`
    fi
    if [ -z "$eligible" ]
    then
        echo "Website is up to date."
    else
        scp $eligible $webdir && touch .upload-stamp
    fi
    #scp gps_report.cgi $cgidir
fi

# End