Targets can be paths
This commit is contained in:
22
shchemes
22
shchemes
@@ -60,10 +60,14 @@ check_scheme_path() {
|
||||
}
|
||||
|
||||
parse_format() {
|
||||
if [ -z "$format" ]; then
|
||||
format=$scheme_format
|
||||
if [ -r "$format" ]; then
|
||||
format_dir="$format"
|
||||
else
|
||||
if [ -z "$format" ]; then
|
||||
format=$scheme_format
|
||||
fi
|
||||
format_dir="${shchemes_dir}/${format}"
|
||||
fi
|
||||
format_dir="${shchemes_dir}/${format}"
|
||||
}
|
||||
|
||||
parse_comment_pattern() {
|
||||
@@ -103,10 +107,14 @@ create_theme() {
|
||||
parse_format
|
||||
|
||||
if [ -n "$target" ]; then
|
||||
template_path=${format_dir}/templates/${target}.mustache
|
||||
if [ ! -r "$template_path" ]; then
|
||||
echo "No viable ${scheme_format} template for \"${target}\""
|
||||
exit 1
|
||||
if [ -r "$target" ]; then
|
||||
template_path="$target"
|
||||
else
|
||||
template_path=${format_dir}/templates/${target}.mustache
|
||||
if [ ! -r "$template_path" ]; then
|
||||
echo "No viable ${scheme_format} template for \"${target}\""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user