bugfix render.sh
This commit is contained in:
parent
aef9b91972
commit
33f9644197
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/ruby
|
||||
# pfiles.rb
|
||||
# v1.0-p3
|
||||
# v1.1-p0
|
||||
require 'find'
|
||||
ignore=!File.file?('dat/ignore.txt') ? [] : File.readlines('dat/ignore.txt')
|
||||
if ignore != []
|
||||
|
@ -20,8 +20,8 @@ l=list.collect
|
|||
case ARGV.first
|
||||
when "doc"
|
||||
for i in l do
|
||||
next if ignore.include?(i) or /\.v.html/.match?(i)
|
||||
if /\.(txti|org|md|html)$/.match?(i)
|
||||
next if ignore.include?(i) or /(?<!\.e)\.html/.match?(i)
|
||||
if /\.(txti|org|md|e.html)$/.match?(i)
|
||||
print i
|
||||
print ' ' unless i==l.last
|
||||
end
|
||||
|
@ -51,4 +51,5 @@ when "rest"
|
|||
end
|
||||
end
|
||||
else
|
||||
abort "\x1B[1;31mERR\x1B[0m: Unknown option: #{ARGV.first}"
|
||||
end
|
||||
|
|
20
render.sh
20
render.sh
|
@ -52,23 +52,21 @@ function sassfn {
|
|||
sass --no-source-map in/css:out/css
|
||||
}
|
||||
function other {
|
||||
local other=`./pfiles.rb rest`
|
||||
local o other=`./pfiles.rb rest`
|
||||
for i in $other; do
|
||||
if test -f $i; then
|
||||
o=${i/in/out}
|
||||
if test -f $o; then
|
||||
inf "Skipping $i, file/hardlink exists..."
|
||||
continue
|
||||
fi
|
||||
ln -v $i ${i/in/out}
|
||||
ln -v $i $o
|
||||
done
|
||||
}
|
||||
function sitemap {
|
||||
./gensimap.sh
|
||||
}
|
||||
function all {
|
||||
load_title
|
||||
dirs
|
||||
docs
|
||||
sass
|
||||
sassfn
|
||||
other
|
||||
}
|
||||
function info {
|
||||
|
@ -110,6 +108,7 @@ if test -z "$*"; then
|
|||
exit $?
|
||||
fi
|
||||
case $1 in
|
||||
clean) rm -rf out;;
|
||||
dir) dirs;;
|
||||
doc) docs;;
|
||||
docs) docs;;
|
||||
|
@ -117,10 +116,13 @@ case $1 in
|
|||
other) dirs; other;;
|
||||
rest) other;;
|
||||
info) info;;
|
||||
sitemap) sitemap;;
|
||||
sitemap) ./sitemap.sh;;
|
||||
vall) info; all;;
|
||||
all) all;;
|
||||
*) all;;
|
||||
*)
|
||||
err "Invalid option, $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
#E: Logic
|
||||
exit $?
|
||||
|
|
Loading…
Reference in New Issue