File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,24 @@ cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/
15
15
latest=` git describe --abbrev=0 --tags`
16
16
latestCopied=none
17
17
lastMinor=" -"
18
- for filename in $( ls -1 ../../versions/[23456789].* .md | sort -r) ; do
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
+ latest=$( ls -1 ../../versions/[23456789].* .md | sort -r | head -n 1)
26
+ files=" $latest "
27
+ elif [ -f " ../../versions/$1 .md" ]; then
28
+ files=" ../../versions/$1 .md"
29
+ else
30
+ echo " Error: version $1 .md not found"
31
+ exit 1
32
+ fi
33
+
34
+ for filename in $files ; do
35
+
19
36
if [[ ${filename} == * -editors.md ]]; then
20
37
continue
21
38
fi
You can’t perform that action at this time.
0 commit comments