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