about summary refs log tree commit diff stats
path: root/trunk/lozenge.sh
blob: 9f0cd55641e2dcfa3ab18fe5d3b87098a33ad0ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

outFile="$1";
shift;
fileList="$@";

echo -n "Updating \"lozenge.js\"..."

list=`echo ${fileList[@]} |\
      sed -e 's/\(\S\+.html\) \?/"\1",/g'\
          -e 's/^\(.*\),$/var files=[\1]/'`

sed -i "s/var files=.*/$list/" "$outFile";

echo "Done."