about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xvienna12
1 files changed, 4 insertions, 8 deletions
diff --git a/vienna b/vienna index e1263ea..bd63a3e 100755 --- a/vienna +++ b/vienna
@@ -92,8 +92,6 @@ main() {
92 shift "$((OPTIND - 1))" 92 shift "$((OPTIND - 1))"
93 # Prepare 93 # Prepare
94 cd "$WORKDIR" || exit 2 94 cd "$WORKDIR" || exit 2
95 # Further argument processing --- pre-build
96 preprocess "$@" || shift
97 # Source config 95 # Source config
98 if test -f "$CONFIG"; then 96 if test -f "$CONFIG"; then
99 # Source ./.vienna.sh, if it exists. 97 # Source ./.vienna.sh, if it exists.
@@ -113,6 +111,8 @@ main() {
113 yornp "Continue building? (y/N)" || exit 2 111 yornp "Continue building? (y/N)" || exit 2
114 fi 112 fi
115 fi 113 fi
114 # Further argument processing --- pre-build
115 preprocess "$@" || shift
116 log vienna config 116 log vienna config
117 # Log configuration variables 117 # Log configuration variables
118 log config 'base url': "$URL_ROOT" 118 log config 'base url': "$URL_ROOT"
@@ -150,10 +150,6 @@ main() {
150} 150}
151 151
152preprocess() { 152preprocess() {
153 case "$*" in
154 *preview*) DOMAIN=http://localhost:${VIENNA_PREVIEW_PORT:-8000} ;;
155 esac
156
157 case "${1:-ok}" in 153 case "${1:-ok}" in
158 ok) ;; 154 ok) ;;
159 init) 155 init)
@@ -210,7 +206,7 @@ directory that tells me what to do.
210EOF 206EOF
211 exit 3 207 exit 3
212} 208}
213alias publish=_publish 209publish() { _publish; }
214 210
215_preview() { 211_preview() {
216 cat <<EOF >&2 212 cat <<EOF >&2
@@ -225,7 +221,7 @@ in this directory that tells me what to do.
225EOF 221EOF
226 exit 3 222 exit 3
227} 223}
228alias preview=_preview 224preview() { _preview; }
229 225
230initialize() { # initialize 226initialize() { # initialize
231 log init "$CONFIG" 227 log init "$CONFIG"