add --clean switch
This commit is contained in:
parent
b452df9822
commit
02246ff26e
13
notes2web
13
notes2web
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ "$1" == "--help" ]] && echo "USAGE: $0 [NOTES_DIRECTORY_1 [NOTES_DIRECTORY_2 [...]]]" && exit 0
|
||||
|
||||
|
||||
# set default config values, load user config, export config variables
|
||||
name=""
|
||||
@ -28,6 +26,17 @@ export index_template
|
||||
export stylesheet
|
||||
|
||||
|
||||
[[ "$1" == "--help" ]] && echo "USAGE: $0 [NOTES_DIRECTORY_1 [NOTES_DIRECTORY_2 [...]]]" && exit 0
|
||||
[[ "$1" == "--clean" ]] && {
|
||||
find -name ".2web" -exec rm {} \;
|
||||
rm -rf "$output"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
mkdir -p "$output"
|
||||
|
||||
|
||||
function _renderarticle {
|
||||
echo "rendering $1"
|
||||
mkdir -p "$(dirname "$output/${1}.html")"
|
||||
|
Reference in New Issue
Block a user