diff options
Diffstat (limited to 'scripts/build_content.sh')
-rwxr-xr-x | scripts/build_content.sh | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index ca75120..6ce857f 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -35,10 +35,28 @@ if [ -z "$1" ]; then | |||
35 | do | 35 | do |
36 | handle "$FILE" | 36 | handle "$FILE" |
37 | done | 37 | done |
38 | elif [ "$2" = "delete" ]; then | 38 | elif [ "$1" = "md" ]; then |
39 | TARGET=$(target "$1") | 39 | find content/ \ |
40 | echo "[DELETE ] $1 -> $TARGET" | 40 | -type f \ |
41 | rm -rf $TARGET | 41 | -name "*.md" \ |
42 | | while read FILE | ||
43 | do | ||
44 | handle "$FILE" | ||
45 | done | ||
46 | elif [ "$1" = "single" ]; then | ||
47 | if [ -z "$2" ]; then | ||
48 | echo "[ERROR ] \"single\" operation requires file argument" | ||
49 | else | ||
50 | handle "$2" | ||
51 | fi | ||
52 | elif [ "$1" = "delete" ]; then | ||
53 | if [ -z "$2" ]; then | ||
54 | echo "[ERROR ] \"delete\" operation requires file argument" | ||
55 | else | ||
56 | TARGET=$(target "$2") | ||
57 | echo "[DELETE ] $2 -> $TARGET" | ||
58 | rm -rf $TARGET | ||
59 | fi | ||
42 | else | 60 | else |
43 | handle "$1" | 61 | echo "[ERROR ] Unknown operation: \"$1\"" |
44 | fi | 62 | fi |