about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-09-29 13:33:56 -0500
committerCase Duckworth2022-09-29 13:33:56 -0500
commita618eac71b9f103f5e3a10a86ee923f6e78af185 (patch)
treefb819cdcdc0f126284a1c50383c3e27762a33ad1
parentAdd preview command (diff)
downloadvienna-a618eac71b9f103f5e3a10a86ee923f6e78af185.tar.gz
vienna-a618eac71b9f103f5e3a10a86ee923f6e78af185.zip
Add more logging
-rwxr-xr-xvienna29
1 files changed, 25 insertions, 4 deletions
diff --git a/vienna b/vienna index 31c46c7..7c8f722 100755 --- a/vienna +++ b/vienna
@@ -65,6 +65,10 @@ configure() {
65 *) exit 1 ;; 65 *) exit 1 ;;
66 esac 66 esac
67 done 67 done
68 ## Log configuration variables
69 echo >&2 "[config] domain: $DOMAIN"
70 echo >&2 "[config] workdir: $WORKD"
71 echo >&2 "[config] output: $OUTD"
68 ## Initialize state 72 ## Initialize state
69 FILE= 73 FILE=
70 ## Cleanup after we're done 74 ## Cleanup after we're done
@@ -80,8 +84,13 @@ main() {
80 configure "$@" 84 configure "$@"
81 shift "$((OPTIND - 1))" 85 shift "$((OPTIND - 1))"
82 # Further argument processing --- pre-build 86 # Further argument processing --- pre-build
83 case "$1" in 87 case "${1:-ok}" in
84 clean) rm -r "$OUTD" ;; 88 ok) ;;
89 clean)
90 echo >&2 "[vienna] clean"
91 rm -r "$OUTD"
92 exit
93 ;;
85 esac 94 esac
86 # Prepare 95 # Prepare
87 cd "$WORKD" || exit 2 96 cd "$WORKD" || exit 2
@@ -102,8 +111,20 @@ main() {
102 # Copy static files 111 # Copy static files
103 static * || exit 2 112 static * || exit 2
104 # Further argument processing --- post-build 113 # Further argument processing --- post-build
105 case "$1" in 114 case "${1:-ok}" in
106 publish) publish "$OUTD" ;; 115 ok) ;;
116 publish)
117 echo >&2 "[vienna] publish"
118 publish "$OUTD"
119 ;;
120 preview)
121 echo >&2 "[vienna] preview"
122 preview "$OUTD"
123 ;;
124 *)
125 echo >&2 "[vienna] Don't know command \`$1'."
126 exit 1
127 ;;
107 esac 128 esac
108} 129}
109 130