Skip to content

Commit 2ba1281

Browse files
author
Ypnose
committedFeb 25, 2015
wswsh: Remove external file support.
We gain 11 SLOC by removing an optional feature which shouldn't be included in the main script. The needed file(s) could be easily added via Makefile (or even an external script called with make). There was also a nasty "bug" when a file added via FIL, had the same extension specified in EXT. It was badly handled by INTERP. A specific find command could be written but once again this feature isn't the "core" of wswsh (vs LOC ratio). HTML files are still automatically managed, therefore you don't need to specify them somewhere (bump Alex).
1 parent d9bae1c commit 2ba1281

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed
 

‎wswsh

-13
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,6 @@ function gen_page {
109109
cp -- "$LINEH" "dest/${LINEH#*/}"
110110
done
111111

112-
# Test if the file exists. Then find it/them and copy it/them to dest (supports multiple files with same name).
113-
if [[ -n $FIL ]]; then
114-
for y in $FIL; do
115-
if [[ -z $(find "src" -type f -name "$y") ]]; then
116-
print -- "$y is missing"
117-
continue
118-
fi
119-
find "src" -type f -name "$y" | while IFS=$'\n' read -r LINEF; do
120-
cp "src/${LINEF#*/}" "dest/${LINEF#*/}"
121-
done
122-
done
123-
fi
124-
125112
cd ..
126113
TOT=$(find "${RAC}/dest" -type f | wc -l)
127114
print "Generated $TOT files"

‎wswsh.conf.default

-5
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,3 @@
4848
# DON'T FORGET THE TRAILING SLASH!
4949
# Default value (when FEED is enabled): dest/
5050
#RSSDIR=""
51-
52-
# Files not handled by the generation.
53-
# Useful for robots.txt files for example.
54-
# Separate filename with spaces.
55-
#FIL=""

0 commit comments

Comments
 (0)