From a1fda0b516cc4e85b7304838949df8fbe0044cf3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 1 Mar 2015 16:14:32 +0000 Subject: Standardize on --long-option instead of -long-option [[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. --- IkiWiki/Plugin/websetup.pm | 8 ++++---- IkiWiki/Setup/Automator.pm | 2 +- Makefile.PL | 6 +++--- auto-blog.setup | 2 +- auto.setup | 2 +- debian/NEWS | 4 ++-- debian/postinst | 2 +- doc/examples/blog.mdwn | 2 +- doc/ikiwiki-calendar.mdwn | 2 +- doc/plugins/amazon_s3.mdwn | 6 +++--- doc/plugins/theme.mdwn | 3 ++- doc/rcs/git.mdwn | 6 +++--- doc/tips/ikiwiki_on_mac_os_x.mdwn | 2 +- doc/tips/laptop_wiki_with_git.mdwn | 4 ++-- doc/tips/nearlyfreespeech.mdwn | 4 ++-- doc/tips/optimising_ikiwiki.mdwn | 8 ++++---- doc/tips/upgrade_to_3.0.mdwn | 4 ++-- ikiwiki-calendar.in | 4 ++-- ikiwiki-mass-rebuild | 2 +- ikiwiki.in | 2 +- po/Makefile | 2 +- t/basewiki_brokenlinks.t | 12 ++++++------ t/comments.t | 2 +- t/conflicts.t | 2 +- t/img.t | 2 +- t/inline.t | 4 ++-- t/permalink.t | 2 +- t/podcast.t | 26 +++++++++++++------------- t/trail.t | 6 +++--- wikilist | 2 +- 30 files changed, 68 insertions(+), 67 deletions(-) diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index f95017c90..d3cbff0d5 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -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; diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index 671438710..a8b04d966 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -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; } diff --git a/Makefile.PL b/Makefile.PL index 5b0eb7471..bee9dfa11 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 diff --git a/auto-blog.setup b/auto-blog.setup index 5617daf9e..8bc00217c 100644 --- a/auto-blog.setup +++ b/auto-blog.setup @@ -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 diff --git a/auto.setup b/auto.setup index afb54b324..843b4193a 100644 --- a/auto.setup +++ b/auto.setup @@ -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 diff --git a/debian/NEWS b/debian/NEWS index b10a0f635..d09b4d9be 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -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 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 Wed, 04 Jun 2008 00:29:28 -0400 diff --git a/debian/postinst b/debian/postinst index 76ad115ac..0a876ae08 100755 --- a/debian/postinst +++ b/debian/postinst @@ -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 diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index 5f8f6c3ce..afef42c30 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -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`: diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index fd3244694..43db4847d 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -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 diff --git a/doc/plugins/amazon_s3.mdwn b/doc/plugins/amazon_s3.mdwn index 7fe60cb8d..52c05f9ae 100644 --- a/doc/plugins/amazon_s3.mdwn +++ b/doc/plugins/amazon_s3.mdwn @@ -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. diff --git a/doc/plugins/theme.mdwn b/doc/plugins/theme.mdwn index 5261df111..bcc36aa81 100644 --- a/doc/plugins/theme.mdwn +++ b/doc/plugins/theme.mdwn @@ -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 `, `--setup` won't work, they are not interchangable) after changing it to see the changes. +enabling the plugin). Refresh the wiki (with `ikiwiki --setup `) +after changing it to see the changes. Hints for theme builders ------------------------ diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn index c82adbd04..fa7a037ba 100644 --- a/doc/rcs/git.mdwn +++ b/doc/rcs/git.mdwn @@ -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 diff --git a/doc/tips/ikiwiki_on_mac_os_x.mdwn b/doc/tips/ikiwiki_on_mac_os_x.mdwn index 86b2ac044..9e4aea139 100644 --- a/doc/tips/ikiwiki_on_mac_os_x.mdwn +++ b/doc/tips/ikiwiki_on_mac_os_x.mdwn @@ -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 diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 4011763fc..3a79e271c 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -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. diff --git a/doc/tips/nearlyfreespeech.mdwn b/doc/tips/nearlyfreespeech.mdwn index a3d1ec678..2e8bdb984 100644 --- a/doc/tips/nearlyfreespeech.mdwn +++ b/doc/tips/nearlyfreespeech.mdwn @@ -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 diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index cf412d266..6e8b60617 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -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). diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn index 05b6d6fbd..4b3a18123 100644 --- a/doc/tips/upgrade_to_3.0.mdwn +++ b/doc/tips/upgrade_to_3.0.mdwn @@ -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 diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 037ef7df4..74e100be2 100755 --- a/ikiwiki-calendar.in +++ b/ikiwiki-calendar.in @@ -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"; diff --git a/ikiwiki-mass-rebuild b/ikiwiki-mass-rebuild index 9b57532bc..06a9b512b 100755 --- a/ikiwiki-mass-rebuild +++ b/ikiwiki-mass-rebuild @@ -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"; } diff --git a/ikiwiki.in b/ikiwiki.in index e6b64f439..1327d70e1 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -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 (@) { diff --git a/po/Makefile b/po/Makefile index 4d1d33e83..b71bb8b91 100644 --- a/po/Makefile +++ b/po/Makefile @@ -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 diff --git a/t/basewiki_brokenlinks.t b/t/basewiki_brokenlinks.t index 74ddc61c5..249d625f6 100755 --- a/t/basewiki_brokenlinks.t +++ b/t/basewiki_brokenlinks.t @@ -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) { diff --git a/t/comments.t b/t/comments.t index da2148b6b..41e731c80 100755 --- a/t/comments.t +++ b/t/comments.t @@ -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 diff --git a/t/conflicts.t b/t/conflicts.t index d7e04d3ae..fae0e84c9 100755 --- a/t/conflicts.t +++ b/t/conflicts.t @@ -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 2ea3abb24..6c295737e 100755 --- 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)); diff --git a/t/inline.t b/t/inline.t index 726227b8f..e07658d98 100755 --- a/t/inline.t +++ b/t/inline.t @@ -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'); diff --git a/t/permalink.t b/t/permalink.t index 36be984c5..13a72fc56 100755 --- a/t/permalink.t +++ b/t/permalink.t @@ -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' t/tmp/out/index.rss`); diff --git a/t/podcast.t b/t/podcast.t index 94505a05e..ef90b5205 100755 --- a/t/podcast.t +++ b/t/podcast.t @@ -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}); } diff --git a/t/trail.t b/t/trail.t index dce3b3c7e..bde812887 100755 --- 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 =~ /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"); diff --git a/wikilist b/wikilist index 5b02db202..a9762ae1a 100644 --- 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 -- cgit v1.2.3