openscad/scripts/update-web.sh

15 lines
423 B
Bash
Raw Normal View History

#!/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
2011-09-12 13:59:50 +04:00
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