cd "${BASH_SOURCE%/*}"
+
script_file=mw-setup-script
page_file=Mediawiki_Setup_Guide
start=' *<source lang="bash"> *'
end=' *<\/source> *'
-ruby <<'EOF' > $page_file
+if [[ $1 != -l ]]; then # use local file
+ ruby <<'EOF' > $page_file
require 'json'
puts JSON.parse(`curl -k 'https://ofswiki.org/w/api.php?\
action=query&titles=Mediawiki_Setup_Guide&prop=revisions&rvprop=content&\
format=json'`.chomp)['query']['pages'].values[0]['revisions'][0]['*']
EOF
+fi
{ cat <<'EOF'
#!/bin/bash