summaryrefslogtreecommitdiff
path: root/scripts/update-web.sh
blob: 4180d017db79082d174395eed4f5e88f266462c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

dmgfile=$1
if [ -z "$dmgfile" ]; then
  echo "Usage: $0 <dmgfile>"
  exit 1
fi
indexfile=../openscad.github.com/index.html
if [ -f $indexfile ]; then
  sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$dmgfile\\3$dmgfile\\5/" $indexfile
  echo "Web page updated. Remember to commit and push openscad.github.com"
else
  echo "Web page not found at $indexfile"
fi
contact: Jan Huwald // Impressum