]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Standardize on --long-option instead of -long-option
authorSimon McVittie <smcv@debian.org>
Sun, 1 Mar 2015 16:14:32 +0000 (16:14 +0000)
committerSimon McVittie <smcv@debian.org>
Sun, 1 Mar 2015 16:15:01 +0000 (16:15 +0000)
[[forum/refresh_and_setup]] indicates some confusion between --setup
and -setup. Both work, but it's clearer if we stick to one in
documentation and code.

A 2012 commit to [[plugins/theme]] claims that "-setup" is required
and "--setup" won't work, but I cannot find any evidence in ikiwiki's
source code that this has ever been the case.

30 files changed:
IkiWiki/Plugin/websetup.pm
IkiWiki/Setup/Automator.pm
Makefile.PL
auto-blog.setup
auto.setup
debian/NEWS
debian/postinst
doc/examples/blog.mdwn
doc/ikiwiki-calendar.mdwn
doc/plugins/amazon_s3.mdwn
doc/plugins/theme.mdwn
doc/rcs/git.mdwn
doc/tips/ikiwiki_on_mac_os_x.mdwn
doc/tips/laptop_wiki_with_git.mdwn
doc/tips/nearlyfreespeech.mdwn
doc/tips/optimising_ikiwiki.mdwn
doc/tips/upgrade_to_3.0.mdwn
ikiwiki-calendar.in
ikiwiki-mass-rebuild
ikiwiki.in
po/Makefile
t/basewiki_brokenlinks.t
t/comments.t
t/conflicts.t
t/img.t
t/inline.t
t/permalink.t
t/podcast.t
t/trail.t
wikilist

index f95017c90d71a6408dbd81028fcb15b32c7a3265..d3cbff0d554cf11f9d6c9b3e9249293e60845ab4 100644 (file)
@@ -460,12 +460,12 @@ sub showform ($$) {
 
                        my @command;
                        if ($form->submitted eq 'Rebuild Wiki') {
-                               @command=("ikiwiki", "-setup", $config{setupfile},
-                                        "-rebuild", "-v");
+                               @command=("ikiwiki", "--setup", $config{setupfile},
+                                        "--rebuild", "-v");
                        }
                        else {
-                               @command=("ikiwiki", "-setup", $config{setupfile},
-                                       "-refresh", "-wrappers", "-v");
+                               @command=("ikiwiki", "--setup", $config{setupfile},
+                                       "--refresh", "--wrappers", "-v");
                        }
 
                        close STDERR;
index 671438710e4444de5dd2f1aacef7183659ccadb1..a8b04d9669eb649d45dd68852bd3eedbf2c14889 100644 (file)
@@ -206,7 +206,7 @@ sub import (@) {
                        prettydir($config{$key})."\n";
        }
        print "To modify settings, edit ".prettydir($config{dumpsetup})." and then run:\n";
-       print " ikiwiki -setup ".prettydir($config{dumpsetup})."\n";
+       print " ikiwiki --setup ".prettydir($config{dumpsetup})."\n";
        exit 0;
 }
 
index 5b0eb747199eb25bba81230238c743438eed6746..bee9dfa11817d52aba1985fd7022d2a80d33f4b7 100755 (executable)
@@ -44,7 +44,7 @@ PROBABLE_INST_LIB=$(shell \\
        chmod +x $@
 
 ikiwiki.setup:
-       HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -dumpsetup ikiwiki.setup
+       HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --dumpsetup ikiwiki.setup
 
 extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir
        ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
@@ -59,7 +59,7 @@ extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir
        rm -f ikiwiki.spec.bkp
        
 docwiki:
-       $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -refresh
+       $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --refresh
 
 perl_shebangs:
 ifneq "$(PERL)" "/usr/bin/perl"
@@ -83,7 +83,7 @@ sysconfdir:
        $(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts)
        
 extra_clean: perl_shebangs_clean
-       $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -clean
+       $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --clean
        rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc
        $(MAKE) -C po clean
 
index 5617daf9e6a30dece748037dd6bebcfa8550dda6..8bc00217c541cd249a5ff7405c13f4a93f64987e 100644 (file)
@@ -5,7 +5,7 @@
 # check it into revision control, generate a setup file for the new
 # wiki, and set everything up.
 #
-# Just run: ikiwiki -setup /etc/ikiwiki/auto-blog.setup
+# Just run: ikiwiki --setup /etc/ikiwiki/auto-blog.setup
 #
 # By default, it asks a few questions, and confines itself to the user's home
 # directory. You can edit it to change what it asks questions about, or to
index afb54b3241895db1315da23567ad242096ac85ea..843b4193aba78f2312f84e3c62cd273274f04438 100644 (file)
@@ -4,7 +4,7 @@
 # This setup file causes ikiwiki to create a wiki, check it into revision
 # control, generate a setup file for the new wiki, and set everything up.
 #
-# Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
+# Just run: ikiwiki --setup /etc/ikiwiki/auto.setup
 #
 # By default, it asks a few questions, and confines itself to the user's home
 # directory. You can edit it to change what it asks questions about, or to
index b10a0f63521cd4a474ee2bbf0edacc7dea483180..d09b4d9be7c3ecb725c60466c32204484c1d284f 100644 (file)
@@ -111,7 +111,7 @@ ikiwiki (3.13) unstable; urgency=low
 
   The `ikiwiki-transition deduplinks` command introduced in the
   last release was buggy. If you followed the NEWS file instructions
-  and ran it, you should run `ikiwiki -setup` to rebuild your wiki
+  and ran it, you should run `ikiwiki --setup` to rebuild your wiki
   to fix the problem.
 
  -- Joey Hess <joeyh@debian.org>  Fri, 22 May 2009 13:04:02 -0400
@@ -209,7 +209,7 @@ ikiwiki (2.49) unstable; urgency=low
   Also, wikis that use the search plugin will need to be rebuilt,
   since the search form has changed. This will not be done automatically,
   but can be done by running `ikiwiki-mass-upgrade` as root, or
-  running `ikiwiki -setup` on individual setup files.
+  running `ikiwiki --setup` on individual setup files.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 04 Jun 2008 00:29:28 -0400
 
index 76ad115ac0ddc6512832997ea20d66e2d05fc10a..0a876ae08a582c2d9ed519b5f5a888a827aefc8b 100755 (executable)
@@ -10,5 +10,5 @@ if [ "$1" = configure ] && \
    dpkg --compare-versions "$2" lt "$firstcompat"; then
        ikiwiki-mass-rebuild
 else
-       ikiwiki-mass-rebuild -refresh -wrappers
+       ikiwiki-mass-rebuild --refresh --wrappers
 fi
index 5f8f6c3ce192bc2e02d7d566e8032fdb3810316d..afef42c30599cdaba6be3047b5e7937db20cbff9 100644 (file)
@@ -3,7 +3,7 @@ your wiki to quickly get started blogging with ikiwiki.
 
 Or, run this command to set up a blog with ikiwiki.
 
-       % ikiwiki -setup /etc/ikiwiki/auto-blog.setup
+       % ikiwiki --setup /etc/ikiwiki/auto-blog.setup
 
 Some additional configuration you might want to do, if not using
 `auto-blog.setup`:
index fd32446944f4b1ee0e40465b9f09e7c5ce5b283c..43db4847d0b692cc9bd33c7c9754b2c0842c5d88 100644 (file)
@@ -50,7 +50,7 @@ the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`.
 
 Most of the goals of this command can be replaced by setting up
 `calendar_autocreate` setup option (of plugin [[plugins/calendar]]), and
-running `ikiwiki -setup you.setup`. The only thing that `ikiwiki-calendar` can
+running `ikiwiki --setup you.setup`. The only thing that `ikiwiki-calendar` can
 do and that `ikiwiki` cannot is forcing page generation (using `-f` switch).
 
 # AUTHOR
index 7fe60cb8d042d070c9d9d980b6417125ced643a9..52c05f9ae489e8a7a60c0ae1b882848825ee7060 100644 (file)
@@ -48,11 +48,11 @@ The `hardlink` config file setting is not compatible with this plugin.
 
 ## data transfer notes
 
-If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
+If you run 'ikiwiki --setup my.setup' to force a rebuild of your wiki, the
 entire thing will be re-uploaded to Amazon S3. This will take time, and
 cost you money, so it should be avoided as much as possible.
 
-If you run 'ikiwiki -setup my.setup -refresh', ikiwiki will only upload the
+If you run 'ikiwiki --setup my.setup --refresh', ikiwiki will only upload the
 modified pages that it refreshes. Faster and cheaper. Still, if you have
 very large pages (for example, a page that inlines hundreds of other pages
 .. or is just very large), the complete page contents will be re-uploaded
@@ -64,5 +64,5 @@ it will be re-uploaded, rather than copied.
 
 ## deleting a bucket
 
-You can use "ikiwiki -setup my.setup --delete-bucket" to delete anything
+You can use "ikiwiki --setup my.setup --delete-bucket" to delete anything
 that's in the configured bucket, and remove the bucket.
index 5261df111f91b1462f36d3f9731479ddb01a7ae2..bcc36aa81b295a4ac7d9e754efcbad0261353b9a 100644 (file)
@@ -8,7 +8,8 @@ inside `/usr/share/ikiwiki/themes/`. See [[themes]] for an overview
 of the themes included in ikiwiki and the [[theme market]] for third party themes.
 
 You can set the theme via the **theme** option in your config file (after
-enabling the plugin). Refresh the wiki (with `ikiwiki -setup <file>`, `--setup` won't work, they are not interchangable) after changing it to see the changes.
+enabling the plugin). Refresh the wiki (with `ikiwiki --setup <file>`)
+after changing it to see the changes.
 
 Hints for theme builders
 ------------------------
index c82adbd049258d7cf49ead1ac8d043138b5ef5fc..fa7a037baea7288c51a1a23d3ca6fdab5981d6c8 100644 (file)
@@ -108,13 +108,13 @@ is the normal behaviour of ikiwiki, set the configuration of the local wiki:
       git_wrapper => "/working/dir/.git/hooks/post-commit",
 
 Then just committing should refresh the private ikiwiki on the local
-host.  Now just run `ikiwiki -setup localwiki.setup -gettime` and
-you should be good to go. (You only need the slow `-gettime` option
+host.  Now just run `ikiwiki --setup localwiki.setup --gettime` and
+you should be good to go. (You only need the slow `--gettime` option
 the first time you run setup.)  Use standard git commands to handle
 pulling from and pushing to the server.  **Note**: After
 pulling changes from the bare root repository, you will need to
 manually update the local wiki, with a command such as `ikiwiki
--setup localwiki.setup -refresh`. You could use git's `post-merge` hook
+--setup localwiki.setup --refresh`. You could use git's `post-merge` hook
 to automate that command.
 
 ## Using ikiwiki with Gerrit
index 86b2ac0443582f2989b525ddac3386f5ac839daa..9e4aea139d211d30e2bf1161f67034e148e21041 100644 (file)
@@ -185,7 +185,7 @@ it installed without issue so I'm baffled why it didn't install from command lin
     _ This setup file causes ikiwiki to create a wiki, check it into revision
     _ control, generate a setup file for the new wiki, and set everything up.
     
-    _ Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
+    _ Just run: ikiwiki --setup /etc/ikiwiki/auto.setup
     
     _By default, it asks a few questions, and confines itself to the user's home
     _directory. You can edit it to change what it asks questions about, or to
index 4011763fc2468ea5b32c957cc5f0a5a1053d4153..3a79e271c09d89ec897ac4921eb6f95a92f52226 100644 (file)
@@ -41,7 +41,7 @@ is standard, but a few special settings are needed:
   and configure it so that each page links to the corresponding page on the
   server.
 
-Now just run `ikiwiki -setup wiki.setup -getctime` and you should be
+Now just run `ikiwiki --setup wiki.setup --getctime` and you should be
 good to go. (You only need the slow `-getctime` option the first time you
 run setup.) If you have taken your `wiki.setup` file from an existing
 wiki, you may need to change certain parameters to adapt to the paths
@@ -71,7 +71,7 @@ You can also direct people to the main server for web edition there.
 Use standard git commands to handle pulling from and pushing to the server.
 
 Note that if changes are pulled from the server, you will need to manually
-update the wiki, with a command such as `ikiwiki -setup wiki.setup -refresh`.
+update the wiki, with a command such as `ikiwiki --setup wiki.setup --refresh`.
 If you'd like it to automatically update when changes are merged in, you
 can simply make a symlink `post-merge` hook pointing at the `post-update`
 hook ikiwiki created.
index a3d1ec678141dc57b81263ec3fa695af9d7d8ba6..2e8bdb984b3739e4fd9b74df72ec91e06782202f 100644 (file)
@@ -78,7 +78,7 @@ Here is an example of how I set up a wiki:
        mkdir ~/wiki
        cd ~/wiki
        cp -r ~/ikiwiki/doc/examples/blog/* .
-       ikiwiki -dumpsetup ikiwiki.setup
+       ikiwiki --dumpsetup ikiwiki.setup
        nano ikiwiki.setup
        # Set destdir to /home/htdocs
        # Set srcdir to /home/private/wiki
@@ -89,7 +89,7 @@ Here is an example of how I set up a wiki:
        # Set the git_wrapper path to /home/private/wiki.git/hooks/post-update
        # Configure the rest to your liking and save the file.
        ikiwiki-makerepo git . ../wiki.git
-       ikiwiki -setup ikiwiki.setup
+       ikiwiki --setup ikiwiki.setup
 
 ## Clean up
 
index cf412d266f17b307ecd0b3732af3fd426a30ff62..6e8b6061767d9a58a0884363388f35090c52085b 100644 (file)
@@ -17,19 +17,19 @@ it's slow, and get the problem fixed!)
 
 Are you building your wiki by running a command like this?
 
-       ikiwiki -setup my.setup
+       ikiwiki --setup my.setup
 
 If so, you're always telling ikiwiki to rebuild the entire site, from
 scratch. But, ikiwiki is smart, it can incrementally update a site,
 building only things affected by the changes you make. You just have to let
 it do so:
 
-       ikiwiki -setup my.setup -refresh
+       ikiwiki --setup my.setup --refresh
 
 Ikiwiki automatically uses an incremental refresh like this when handing
 a web edit, or when run from a [[rcs]] post-commit hook. (If you've
 configured the hook in the usual way.) Most people who have run into this
-problem got in the habit of running `ikiwiki -setup my.setup` by hand
+problem got in the habit of running `ikiwiki --setup my.setup` by hand
 when their wiki was small, and found it got slower as they added pages.
 
 ## use the latest version
@@ -174,7 +174,7 @@ Finally, let's think about how huge number of pages can affect ikiwiki.
   command. Obviously, more files will make it take longer.
 
   You can avoid this scanning overhead, if you're using git, by setting
-  `only_committed_changes`. This makes ikiwiki -refresh query git for
+  `only_committed_changes`. This makes ikiwiki --refresh query git for
   changed files since the last time, which tends to be a lot faster.
   However, it only works if all files in your wiki are committed to git
   (or stored in the [[/plugins/transient]] underlay).
index 05b6d6fbd03d72f181c6733ab1fa6bf15f27a433..4b3a181236188296320156134c2fb0bcf90326c9 100644 (file)
@@ -21,7 +21,7 @@ setup file, and will no longer appear on the admin preferences page once
 your wiki is upgraded to 3.0.
 
 You can move these preferences into the setup file by running
-`ikiwiki-transition moveprefs your.setup; ikiwiki -setup your.setup -refresh -wrappers`
+`ikiwiki-transition moveprefs your.setup; ikiwiki --setup your.setup --refresh --wrappers`
 
 (Make sure you have converted the setup file to the new format first.)
 
@@ -80,7 +80,7 @@ Otherwise, follow this procedure to upgrade a wiki using the aggregate plugin:
 2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
    files in the srcdir. The command to run is
    `ikiwiki-transition aggregateinternal your.setup`,
-3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+3. Refresh the wiki. (`ikiwiki --setup your.setup --refresh`)
 
 ## embed / googlecalendar
 
index 037ef7df44ee10acc15cca0965ac42d81a46f84e..74e100be2e85223d7930b027f2db9c712d8a621e 100755 (executable)
@@ -62,5 +62,5 @@ foreach my $y ($startyear..$endyear) {
 IkiWiki::rcs_commit_staged(message => gettext("calendar update"))
        if $config{rcs};
 
-exec("ikiwiki", "-setup", $setup, "-refresh");
-die "failed to run ikiwiki -setup $setup -refresh\n";
+exec("ikiwiki", "--setup", $setup, "--refresh");
+die "failed to run ikiwiki --setup $setup --refresh\n";
index 9b57532bcce1897454b46a08ef62055c6982525c..06a9b512b42ca8afc176ad4dfbe7aba8db3506c1 100755 (executable)
@@ -20,7 +20,7 @@ sub processline {
                return;
        }
        print "Processing $setup as user ".username()." ...\n";
-       my $ret=system("ikiwiki", "-setup", $setup, @ARGV);
+       my $ret=system("ikiwiki", "--setup", $setup, @ARGV);
        if ($ret != 0) {
                print STDERR "warning: processing $setup failed with code $ret\n";
        }
index e6b64f43949aba391a411c31b1cf57a0c8b56c2e..1327d70e13273f0692ea1b5957063ddaf2a26402 100755 (executable)
@@ -8,7 +8,7 @@ use IkiWiki 3.00;
 
 sub usage () {
        die gettext("usage: ikiwiki [options] source dest"), "\n",
-           gettext("       ikiwiki --setup configfile"), "\n";
+           gettext("       ikiwiki --setup my.setup [options]"), "\n";
 }
 
 sub setup (@) {
index 4d1d33e83246ad54bb705d9e09f7469d23418fbe..b71bb8b91bd1d2d68dce77fe2f2a44339ef3fd70 100644 (file)
@@ -81,7 +81,7 @@ underlays_copy_stamp:
        touch $@
 
 underlays: ../ikiwiki.out underlays_copy_stamp
-       ../ikiwiki.out -libdir .. -setup underlay.setup -refresh
+       ../ikiwiki.out --libdir .. --setup underlay.setup --refresh
 
 ../ikiwiki.out: ../Makefile
        $(MAKE) -C .. ikiwiki.out
index 74ddc61c5a8b636a80b5ed24c293ce2c3582c4de..249d625f66058550f766c9d500511a1de0e51ade 100755 (executable)
@@ -8,14 +8,14 @@ ok(! system("make -s ikiwiki.out"));
 ok(! system("make underlay_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
 
 foreach my $plugin ("", "listdirectives") {
-       ok(! system("LC_ALL=C perl -I. ./ikiwiki.out -rebuild -plugin brokenlinks ".
+       ok(! system("LC_ALL=C perl -I. ./ikiwiki.out --rebuild --plugin brokenlinks ".
                        # always enabled because pages link to it conditionally,
                        # which brokenlinks cannot handle properly
-                       "-plugin smiley ".
-                       ($plugin ? "-plugin $plugin " : "").
-                       "-underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
-                       "-set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
-                       "-templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
+                       "--plugin smiley ".
+                       ($plugin ? "--plugin $plugin " : "").
+                       "--underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
+                       "--set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
+                       "--templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
        my $result=`grep 'no broken links' t/tmp/out/index.html`;
        ok(length($result));
        if (! length $result) {
index da2148b6b8f8cc5a3a92db07420397971ae1fe84..41e731c8092ba1777ac0a01901212e38afce60d1 100755 (executable)
@@ -40,7 +40,7 @@ ok(utime(333333333, 333333333, "t/tmp/in/post/comment_1._comment"));
 
 # Build the wiki
 ok(! system("make -s ikiwiki.out"));
-ok(! system("perl -I. ./ikiwiki.out -verbose -plugin comments -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -set comments_pagespec='*' -templatedir=templates t/tmp/in t/tmp/out"));
+ok(! system("perl -I. ./ikiwiki.out --verbose --plugin comments --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --set comments_pagespec='*' --templatedir=templates t/tmp/in t/tmp/out"));
 
 # Check that the comments are in the right order
 
index d7e04d3ae39a66b1bdcd711aa0aa0ee12f0584ec..fae0e84c9afda1365b14106313640e8e9aa5f889 100755 (executable)
@@ -12,7 +12,7 @@ ok(! system("make -s ikiwiki.out"));
 # runs ikiwiki to build test site
 sub runiki {
        my $testdesc=shift;
-       ok((! system("perl -I. ./ikiwiki.out -plugin txt -plugin rawhtml -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates $srcdir $destdir @_")),
+       ok((! system("perl -I. ./ikiwiki.out --plugin txt --plugin rawhtml --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates $srcdir $destdir @_")),
                $testdesc);
 }
 sub refreshiki {
diff --git a/t/img.t b/t/img.t
index 2ea3abb24c353ffb16752988c2ace6064b839539..6c295737e53a7da2705d6b04af7f394b720fe899 100755 (executable)
--- a/t/img.t
+++ b/t/img.t
@@ -50,7 +50,7 @@ EOF
 
 ok(! system("make -s ikiwiki.out"));
 
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -templatedir=templates -plugin img t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --templatedir=templates --plugin img t/tmp/in t/tmp/out --verbose";
 
 ok(! system($command));
 
index 726227b8f0a7e88419ea2986ab7537063174773d..e07658d988168753adbe0b70b29487f556b5cc21 100755 (executable)
@@ -35,11 +35,11 @@ foreach my $page (qw(protagonists/shepard protagonists/link
 
 ok(! system("make -s ikiwiki.out"));
 
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tmp/in t/tmp/out --verbose";
 
 ok(! system($command));
 
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
 
 $blob = readfile("t/tmp/out/protagonists.html");
 like($blob, qr{Add a new post}, 'rootpage=yes gives postform');
index 36be984c56fd80aa88796d65bb98dee64f06fe23..13a72fc5625fa25cd0b7a7624948fadd26ab9f09 100755 (executable)
@@ -6,7 +6,7 @@ use Test::More 'no_plan';
 ok(! system("rm -rf t/tmp"));
 ok(! system("mkdir t/tmp"));
 ok(! system("make -s ikiwiki.out"));
-ok(! system("perl -I. ./ikiwiki.out -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tinyblog t/tmp/out"));
+ok(! system("perl -I. ./ikiwiki.out --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tinyblog t/tmp/out"));
 # This guid should never, ever change, for any reason whatsoever!
 my $guid="http://example.com/post/";
 ok(length `egrep '<guid.*>$guid</guid>' t/tmp/out/index.rss`);
index 94505a05e2ca70dabcbdd28f4cda14be353fbf9f..ef90b5205e49932075e9f87d38fc91797b992447 100755 (executable)
@@ -23,10 +23,10 @@ sub podcast {
        my $podcast_style = shift;
 
        my $baseurl = 'http://example.com';
-       my @command = (qw(./ikiwiki.out -plugin inline -rss -atom));
+       my @command = (qw(./ikiwiki.out --plugin inline --rss --atom));
        push @command, qw(-underlaydir=underlays/basewiki);
-       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
-       push @command, "-url=$baseurl", qw(t/tinypodcast), "$tmp/out";
+       push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
+       push @command, "--url=$baseurl", qw(t/tinypodcast), "$tmp/out";
 
        ok(! system("mkdir $tmp"),
                q{setup});
@@ -115,7 +115,7 @@ sub podcast {
 sub single_page_html {
        my @command = (qw(./ikiwiki.out));
        push @command, qw(-underlaydir=underlays/basewiki);
-       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+       push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
        push @command, qw(t/tinypodcast), "$tmp/out";
 
        ok(! system("mkdir $tmp"),
@@ -130,7 +130,7 @@ sub single_page_html {
                q{html enclosure});
        my ($href) = _extract_html_links($html, 'piano');
        is($href, '/piano.mp3',
-               q{html enclosure sans -url is site-absolute});
+               q{html enclosure sans --url is site-absolute});
 
        $html = "$tmp/out/attempted_multiple_enclosures/index.html";
        like(_extract_html_content($html, 'content'), qr/has content and/m,
@@ -139,28 +139,28 @@ sub single_page_html {
                q{html enclosure});
        ($href) = _extract_html_links($html, 'walter');
        is($href, '/walter.ogg',
-               q{html enclosure sans -url is site-absolute});
+               q{html enclosure sans --url is site-absolute});
 
        my $baseurl = 'http://example.com';
-       ok(! system(@command, "-url=$baseurl", q{--rebuild}));
+       ok(! system(@command, "--url=$baseurl", q{--rebuild}));
 
        $html = "$tmp/out/pianopost/index.html";
        ($href) = _extract_html_links($html, 'piano');
        is($href, "$baseurl/piano.mp3",
-               q{html enclosure with -url is fully absolute});
+               q{html enclosure with --url is fully absolute});
 
        $html = "$tmp/out/attempted_multiple_enclosures/index.html";
        ($href) = _extract_html_links($html, 'walter');
        is($href, "$baseurl/walter.ogg",
-               q{html enclosure with -url is fully absolute});
+               q{html enclosure with --url is fully absolute});
 
        ok(! system("rm -rf $tmp $statedir"), q{teardown});
 }
 
 sub inlined_pages_html {
-       my @command = (qw(./ikiwiki.out -plugin inline));
+       my @command = (qw(./ikiwiki.out --plugin inline));
        push @command, qw(-underlaydir=underlays/basewiki);
-       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+       push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
        push @command, qw(t/tinypodcast), "$tmp/out";
 
        ok(! system("mkdir $tmp"),
@@ -179,10 +179,10 @@ sub inlined_pages_html {
                q{html enclosure});
        my ($href) = _extract_html_links($html, 'piano.mp3');
        is($href, '/piano.mp3',
-               q{html enclosure from pianopost sans -url});
+               q{html enclosure from pianopost sans --url});
        ($href) = _extract_html_links($html, 'walter.ogg');
        is($href, '/walter.ogg',
-               q{html enclosure from attempted_multiple_enclosures sans -url});
+               q{html enclosure from attempted_multiple_enclosures sans --url});
 
        ok(! system("rm -rf $tmp $statedir"), q{teardown});
 }
index dce3b3c7e4df551984c30c6ed0a0cecac53631ed..bde812887ae1083aa97a65f93b1ec06bff9e2be8 100755 (executable)
--- a/t/trail.t
+++ b/t/trail.t
@@ -131,11 +131,11 @@ EOF
 
 ok(! system("make -s ikiwiki.out"));
 
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -plugin trail -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --plugin trail --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tmp/in t/tmp/out --verbose";
 
 ok(! system($command));
 
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
 
 $blob = readfile("t/tmp/out/meme.html");
 ok($blob =~ /<a href="(\.\/)?badger.html">badger<\/a>/m);
@@ -232,7 +232,7 @@ writefile("limited/c.mdwn", "t/tmp/in", '[[!meta title="New C page"]]c');
 
 writefile("untrail.mdwn", "t/tmp/in", "no longer a trail");
 
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
 
 check_trail("add/a.html", "n=add/b p=");
 check_trail("add/b.html", "n=add/c p=add/a");
index 5b02db20213507093320609d20a811f33310eb24..a9762ae1a7fcdf81708bac1ab0caf1e95661e574 100644 (file)
--- a/wikilist
+++ b/wikilist
@@ -2,7 +2,7 @@
 # wikis. Run this script when upgrading ikiwiki to an incompatible new
 # version that requires rebuilding everything.
 #
-# ikiwiki-mass-rebuild su's to the listed user and then runs ikiwiki -setup
+# ikiwiki-mass-rebuild su's to the listed user and then runs ikiwiki --setup
 # on the specified ikiwiki setup file.
 #
 # It's also possible to let a user list setup files in ~user/.ikiwiki/wikilist