File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,24 @@ cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/
1515latest=` git describe --abbrev=0 --tags`
1616latestCopied=none
1717lastMinor=" -"
18- for filename in $( ls -1 ../../versions/[23456789].* .md | sort -r) ; do
19- if [[ ${filename} == * -editors.md ]]; then
18+
19+ # If $1 is undefined, process all versions
20+ # If $1 is "latest", determine the highest version and process that one
21+ # If $1 is a number, check whether that version exists; report error if no file, otherwise process
22+ if [ -z " $1 " ]; then
23+ files=$( ls -1 ../../versions/[23456789].* .md | sort -r)
24+ elif [ " $1 " = " latest" ]; then
25+ files=" ../../versions/$latest .md"
26+ elif [ -f " ../../versions/$1 .md" ]; then
27+ files=" ../../versions/$1 .md"
28+ else
29+ echo " Error: version $1 .md not found"
30+ exit 1
31+ fi
32+
33+ for filename in $files ; do
34+
35+ if [[ ${filename} == * -editors.md ]]; then
2036 continue
2137 fi
2238
You can’t perform that action at this time.
0 commit comments