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.master
parent
0700b26b58
commit
a1fda0b516
|
@ -460,12 +460,12 @@ sub showform ($$) {
|
||||||
|
|
||||||
my @command;
|
my @command;
|
||||||
if ($form->submitted eq 'Rebuild Wiki') {
|
if ($form->submitted eq 'Rebuild Wiki') {
|
||||||
@command=("ikiwiki", "-setup", $config{setupfile},
|
@command=("ikiwiki", "--setup", $config{setupfile},
|
||||||
"-rebuild", "-v");
|
"--rebuild", "-v");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@command=("ikiwiki", "-setup", $config{setupfile},
|
@command=("ikiwiki", "--setup", $config{setupfile},
|
||||||
"-refresh", "-wrappers", "-v");
|
"--refresh", "--wrappers", "-v");
|
||||||
}
|
}
|
||||||
|
|
||||||
close STDERR;
|
close STDERR;
|
||||||
|
|
|
@ -206,7 +206,7 @@ sub import (@) {
|
||||||
prettydir($config{$key})."\n";
|
prettydir($config{$key})."\n";
|
||||||
}
|
}
|
||||||
print "To modify settings, edit ".prettydir($config{dumpsetup})." and then run:\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;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ PROBABLE_INST_LIB=$(shell \\
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
ikiwiki.setup:
|
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
|
extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir
|
||||||
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
|
./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
|
rm -f ikiwiki.spec.bkp
|
||||||
|
|
||||||
docwiki:
|
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:
|
perl_shebangs:
|
||||||
ifneq "$(PERL)" "/usr/bin/perl"
|
ifneq "$(PERL)" "/usr/bin/perl"
|
||||||
|
@ -83,7 +83,7 @@ sysconfdir:
|
||||||
$(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts)
|
$(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts)
|
||||||
|
|
||||||
extra_clean: perl_shebangs_clean
|
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
|
rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc
|
||||||
$(MAKE) -C po clean
|
$(MAKE) -C po clean
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# check it into revision control, generate a setup file for the new
|
# check it into revision control, generate a setup file for the new
|
||||||
# wiki, and set everything up.
|
# 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
|
# 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
|
# directory. You can edit it to change what it asks questions about, or to
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# This setup file causes ikiwiki to create a wiki, check it into revision
|
# 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.
|
# 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
|
# 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
|
# directory. You can edit it to change what it asks questions about, or to
|
||||||
|
|
|
@ -111,7 +111,7 @@ ikiwiki (3.13) unstable; urgency=low
|
||||||
|
|
||||||
The `ikiwiki-transition deduplinks` command introduced in the
|
The `ikiwiki-transition deduplinks` command introduced in the
|
||||||
last release was buggy. If you followed the NEWS file instructions
|
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.
|
to fix the problem.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Fri, 22 May 2009 13:04:02 -0400
|
-- 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,
|
Also, wikis that use the search plugin will need to be rebuilt,
|
||||||
since the search form has changed. This will not be done automatically,
|
since the search form has changed. This will not be done automatically,
|
||||||
but can be done by running `ikiwiki-mass-upgrade` as root, or
|
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
|
-- Joey Hess <joeyh@debian.org> Wed, 04 Jun 2008 00:29:28 -0400
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,5 @@ if [ "$1" = configure ] && \
|
||||||
dpkg --compare-versions "$2" lt "$firstcompat"; then
|
dpkg --compare-versions "$2" lt "$firstcompat"; then
|
||||||
ikiwiki-mass-rebuild
|
ikiwiki-mass-rebuild
|
||||||
else
|
else
|
||||||
ikiwiki-mass-rebuild -refresh -wrappers
|
ikiwiki-mass-rebuild --refresh --wrappers
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@ your wiki to quickly get started blogging with ikiwiki.
|
||||||
|
|
||||||
Or, run this command to set up a blog 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
|
Some additional configuration you might want to do, if not using
|
||||||
`auto-blog.setup`:
|
`auto-blog.setup`:
|
||||||
|
|
|
@ -50,7 +50,7 @@ the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`.
|
||||||
|
|
||||||
Most of the goals of this command can be replaced by setting up
|
Most of the goals of this command can be replaced by setting up
|
||||||
`calendar_autocreate` setup option (of plugin [[plugins/calendar]]), and
|
`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).
|
do and that `ikiwiki` cannot is forcing page generation (using `-f` switch).
|
||||||
|
|
||||||
# AUTHOR
|
# AUTHOR
|
||||||
|
|
|
@ -48,11 +48,11 @@ The `hardlink` config file setting is not compatible with this plugin.
|
||||||
|
|
||||||
## data transfer notes
|
## 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
|
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.
|
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
|
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
|
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
|
.. 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
|
## 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.
|
that's in the configured bucket, and remove the bucket.
|
||||||
|
|
|
@ -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.
|
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
|
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
|
Hints for theme builders
|
||||||
------------------------
|
------------------------
|
||||||
|
|
|
@ -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",
|
git_wrapper => "/working/dir/.git/hooks/post-commit",
|
||||||
|
|
||||||
Then just committing should refresh the private ikiwiki on the local
|
Then just committing should refresh the private ikiwiki on the local
|
||||||
host. Now just run `ikiwiki -setup localwiki.setup -gettime` and
|
host. Now just run `ikiwiki --setup localwiki.setup --gettime` and
|
||||||
you should be good to go. (You only need the slow `-gettime` option
|
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
|
the first time you run setup.) Use standard git commands to handle
|
||||||
pulling from and pushing to the server. **Note**: After
|
pulling from and pushing to the server. **Note**: After
|
||||||
pulling changes from the bare root repository, you will need to
|
pulling changes from the bare root repository, you will need to
|
||||||
manually update the local wiki, with a command such as `ikiwiki
|
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.
|
to automate that command.
|
||||||
|
|
||||||
## Using ikiwiki with Gerrit
|
## Using ikiwiki with Gerrit
|
||||||
|
|
|
@ -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
|
_ 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.
|
_ 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
|
_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
|
_directory. You can edit it to change what it asks questions about, or to
|
||||||
|
|
|
@ -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
|
and configure it so that each page links to the corresponding page on the
|
||||||
server.
|
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
|
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
|
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
|
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.
|
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
|
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
|
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`
|
can simply make a symlink `post-merge` hook pointing at the `post-update`
|
||||||
hook ikiwiki created.
|
hook ikiwiki created.
|
||||||
|
|
|
@ -78,7 +78,7 @@ Here is an example of how I set up a wiki:
|
||||||
mkdir ~/wiki
|
mkdir ~/wiki
|
||||||
cd ~/wiki
|
cd ~/wiki
|
||||||
cp -r ~/ikiwiki/doc/examples/blog/* .
|
cp -r ~/ikiwiki/doc/examples/blog/* .
|
||||||
ikiwiki -dumpsetup ikiwiki.setup
|
ikiwiki --dumpsetup ikiwiki.setup
|
||||||
nano ikiwiki.setup
|
nano ikiwiki.setup
|
||||||
# Set destdir to /home/htdocs
|
# Set destdir to /home/htdocs
|
||||||
# Set srcdir to /home/private/wiki
|
# 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
|
# Set the git_wrapper path to /home/private/wiki.git/hooks/post-update
|
||||||
# Configure the rest to your liking and save the file.
|
# Configure the rest to your liking and save the file.
|
||||||
ikiwiki-makerepo git . ../wiki.git
|
ikiwiki-makerepo git . ../wiki.git
|
||||||
ikiwiki -setup ikiwiki.setup
|
ikiwiki --setup ikiwiki.setup
|
||||||
|
|
||||||
## Clean up
|
## Clean up
|
||||||
|
|
||||||
|
|
|
@ -17,19 +17,19 @@ it's slow, and get the problem fixed!)
|
||||||
|
|
||||||
Are you building your wiki by running a command like this?
|
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
|
If so, you're always telling ikiwiki to rebuild the entire site, from
|
||||||
scratch. But, ikiwiki is smart, it can incrementally update a site,
|
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
|
building only things affected by the changes you make. You just have to let
|
||||||
it do so:
|
it do so:
|
||||||
|
|
||||||
ikiwiki -setup my.setup -refresh
|
ikiwiki --setup my.setup --refresh
|
||||||
|
|
||||||
Ikiwiki automatically uses an incremental refresh like this when handing
|
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
|
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
|
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.
|
when their wiki was small, and found it got slower as they added pages.
|
||||||
|
|
||||||
## use the latest version
|
## 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.
|
command. Obviously, more files will make it take longer.
|
||||||
|
|
||||||
You can avoid this scanning overhead, if you're using git, by setting
|
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.
|
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
|
However, it only works if all files in your wiki are committed to git
|
||||||
(or stored in the [[/plugins/transient]] underlay).
|
(or stored in the [[/plugins/transient]] underlay).
|
||||||
|
|
|
@ -21,7 +21,7 @@ setup file, and will no longer appear on the admin preferences page once
|
||||||
your wiki is upgraded to 3.0.
|
your wiki is upgraded to 3.0.
|
||||||
|
|
||||||
You can move these preferences into the setup file by running
|
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.)
|
(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`
|
2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
|
||||||
files in the srcdir. The command to run is
|
files in the srcdir. The command to run is
|
||||||
`ikiwiki-transition aggregateinternal your.setup`,
|
`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
|
## embed / googlecalendar
|
||||||
|
|
||||||
|
|
|
@ -62,5 +62,5 @@ foreach my $y ($startyear..$endyear) {
|
||||||
IkiWiki::rcs_commit_staged(message => gettext("calendar update"))
|
IkiWiki::rcs_commit_staged(message => gettext("calendar update"))
|
||||||
if $config{rcs};
|
if $config{rcs};
|
||||||
|
|
||||||
exec("ikiwiki", "-setup", $setup, "-refresh");
|
exec("ikiwiki", "--setup", $setup, "--refresh");
|
||||||
die "failed to run ikiwiki -setup $setup -refresh\n";
|
die "failed to run ikiwiki --setup $setup --refresh\n";
|
||||||
|
|
|
@ -20,7 +20,7 @@ sub processline {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print "Processing $setup as user ".username()." ...\n";
|
print "Processing $setup as user ".username()." ...\n";
|
||||||
my $ret=system("ikiwiki", "-setup", $setup, @ARGV);
|
my $ret=system("ikiwiki", "--setup", $setup, @ARGV);
|
||||||
if ($ret != 0) {
|
if ($ret != 0) {
|
||||||
print STDERR "warning: processing $setup failed with code $ret\n";
|
print STDERR "warning: processing $setup failed with code $ret\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ use IkiWiki 3.00;
|
||||||
|
|
||||||
sub usage () {
|
sub usage () {
|
||||||
die gettext("usage: ikiwiki [options] source dest"), "\n",
|
die gettext("usage: ikiwiki [options] source dest"), "\n",
|
||||||
gettext(" ikiwiki --setup configfile"), "\n";
|
gettext(" ikiwiki --setup my.setup [options]"), "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub setup (@) {
|
sub setup (@) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ underlays_copy_stamp:
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
underlays: ../ikiwiki.out underlays_copy_stamp
|
underlays: ../ikiwiki.out underlays_copy_stamp
|
||||||
../ikiwiki.out -libdir .. -setup underlay.setup -refresh
|
../ikiwiki.out --libdir .. --setup underlay.setup --refresh
|
||||||
|
|
||||||
../ikiwiki.out: ../Makefile
|
../ikiwiki.out: ../Makefile
|
||||||
$(MAKE) -C .. ikiwiki.out
|
$(MAKE) -C .. ikiwiki.out
|
||||||
|
|
|
@ -8,14 +8,14 @@ ok(! system("make -s ikiwiki.out"));
|
||||||
ok(! system("make underlay_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
|
ok(! system("make underlay_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
|
||||||
|
|
||||||
foreach my $plugin ("", "listdirectives") {
|
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,
|
# always enabled because pages link to it conditionally,
|
||||||
# which brokenlinks cannot handle properly
|
# which brokenlinks cannot handle properly
|
||||||
"-plugin smiley ".
|
"--plugin smiley ".
|
||||||
($plugin ? "-plugin $plugin " : "").
|
($plugin ? "--plugin $plugin " : "").
|
||||||
"-underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
|
"--underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
|
||||||
"-set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
|
"--set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
|
||||||
"-templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
|
"--templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
|
||||||
my $result=`grep 'no broken links' t/tmp/out/index.html`;
|
my $result=`grep 'no broken links' t/tmp/out/index.html`;
|
||||||
ok(length($result));
|
ok(length($result));
|
||||||
if (! length $result) {
|
if (! length $result) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ ok(utime(333333333, 333333333, "t/tmp/in/post/comment_1._comment"));
|
||||||
|
|
||||||
# Build the wiki
|
# Build the wiki
|
||||||
ok(! system("make -s ikiwiki.out"));
|
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
|
# Check that the comments are in the right order
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ ok(! system("make -s ikiwiki.out"));
|
||||||
# runs ikiwiki to build test site
|
# runs ikiwiki to build test site
|
||||||
sub runiki {
|
sub runiki {
|
||||||
my $testdesc=shift;
|
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);
|
$testdesc);
|
||||||
}
|
}
|
||||||
sub refreshiki {
|
sub refreshiki {
|
||||||
|
|
2
t/img.t
2
t/img.t
|
@ -50,7 +50,7 @@ EOF
|
||||||
|
|
||||||
ok(! system("make -s ikiwiki.out"));
|
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));
|
ok(! system($command));
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,11 @@ foreach my $page (qw(protagonists/shepard protagonists/link
|
||||||
|
|
||||||
ok(! system("make -s ikiwiki.out"));
|
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));
|
||||||
|
|
||||||
ok(! system("$command -refresh"));
|
ok(! system("$command --refresh"));
|
||||||
|
|
||||||
$blob = readfile("t/tmp/out/protagonists.html");
|
$blob = readfile("t/tmp/out/protagonists.html");
|
||||||
like($blob, qr{Add a new post}, 'rootpage=yes gives postform');
|
like($blob, qr{Add a new post}, 'rootpage=yes gives postform');
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Test::More 'no_plan';
|
||||||
ok(! system("rm -rf t/tmp"));
|
ok(! system("rm -rf t/tmp"));
|
||||||
ok(! system("mkdir t/tmp"));
|
ok(! system("mkdir t/tmp"));
|
||||||
ok(! system("make -s ikiwiki.out"));
|
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!
|
# This guid should never, ever change, for any reason whatsoever!
|
||||||
my $guid="http://example.com/post/";
|
my $guid="http://example.com/post/";
|
||||||
ok(length `egrep '<guid.*>$guid</guid>' t/tmp/out/index.rss`);
|
ok(length `egrep '<guid.*>$guid</guid>' t/tmp/out/index.rss`);
|
||||||
|
|
26
t/podcast.t
26
t/podcast.t
|
@ -23,10 +23,10 @@ sub podcast {
|
||||||
my $podcast_style = shift;
|
my $podcast_style = shift;
|
||||||
|
|
||||||
my $baseurl = 'http://example.com';
|
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(-underlaydir=underlays/basewiki);
|
||||||
push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
|
push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
|
||||||
push @command, "-url=$baseurl", qw(t/tinypodcast), "$tmp/out";
|
push @command, "--url=$baseurl", qw(t/tinypodcast), "$tmp/out";
|
||||||
|
|
||||||
ok(! system("mkdir $tmp"),
|
ok(! system("mkdir $tmp"),
|
||||||
q{setup});
|
q{setup});
|
||||||
|
@ -115,7 +115,7 @@ sub podcast {
|
||||||
sub single_page_html {
|
sub single_page_html {
|
||||||
my @command = (qw(./ikiwiki.out));
|
my @command = (qw(./ikiwiki.out));
|
||||||
push @command, qw(-underlaydir=underlays/basewiki);
|
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";
|
push @command, qw(t/tinypodcast), "$tmp/out";
|
||||||
|
|
||||||
ok(! system("mkdir $tmp"),
|
ok(! system("mkdir $tmp"),
|
||||||
|
@ -130,7 +130,7 @@ sub single_page_html {
|
||||||
q{html enclosure});
|
q{html enclosure});
|
||||||
my ($href) = _extract_html_links($html, 'piano');
|
my ($href) = _extract_html_links($html, 'piano');
|
||||||
is($href, '/piano.mp3',
|
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";
|
$html = "$tmp/out/attempted_multiple_enclosures/index.html";
|
||||||
like(_extract_html_content($html, 'content'), qr/has content and/m,
|
like(_extract_html_content($html, 'content'), qr/has content and/m,
|
||||||
|
@ -139,28 +139,28 @@ sub single_page_html {
|
||||||
q{html enclosure});
|
q{html enclosure});
|
||||||
($href) = _extract_html_links($html, 'walter');
|
($href) = _extract_html_links($html, 'walter');
|
||||||
is($href, '/walter.ogg',
|
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';
|
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";
|
$html = "$tmp/out/pianopost/index.html";
|
||||||
($href) = _extract_html_links($html, 'piano');
|
($href) = _extract_html_links($html, 'piano');
|
||||||
is($href, "$baseurl/piano.mp3",
|
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";
|
$html = "$tmp/out/attempted_multiple_enclosures/index.html";
|
||||||
($href) = _extract_html_links($html, 'walter');
|
($href) = _extract_html_links($html, 'walter');
|
||||||
is($href, "$baseurl/walter.ogg",
|
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});
|
ok(! system("rm -rf $tmp $statedir"), q{teardown});
|
||||||
}
|
}
|
||||||
|
|
||||||
sub inlined_pages_html {
|
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(-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";
|
push @command, qw(t/tinypodcast), "$tmp/out";
|
||||||
|
|
||||||
ok(! system("mkdir $tmp"),
|
ok(! system("mkdir $tmp"),
|
||||||
|
@ -179,10 +179,10 @@ sub inlined_pages_html {
|
||||||
q{html enclosure});
|
q{html enclosure});
|
||||||
my ($href) = _extract_html_links($html, 'piano.mp3');
|
my ($href) = _extract_html_links($html, 'piano.mp3');
|
||||||
is($href, '/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');
|
($href) = _extract_html_links($html, 'walter.ogg');
|
||||||
is($href, '/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});
|
ok(! system("rm -rf $tmp $statedir"), q{teardown});
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,11 +131,11 @@ EOF
|
||||||
|
|
||||||
ok(! system("make -s ikiwiki.out"));
|
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));
|
||||||
|
|
||||||
ok(! system("$command -refresh"));
|
ok(! system("$command --refresh"));
|
||||||
|
|
||||||
$blob = readfile("t/tmp/out/meme.html");
|
$blob = readfile("t/tmp/out/meme.html");
|
||||||
ok($blob =~ /<a href="(\.\/)?badger.html">badger<\/a>/m);
|
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");
|
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/a.html", "n=add/b p=");
|
||||||
check_trail("add/b.html", "n=add/c p=add/a");
|
check_trail("add/b.html", "n=add/c p=add/a");
|
||||||
|
|
2
wikilist
2
wikilist
|
@ -2,7 +2,7 @@
|
||||||
# wikis. Run this script when upgrading ikiwiki to an incompatible new
|
# wikis. Run this script when upgrading ikiwiki to an incompatible new
|
||||||
# version that requires rebuilding everything.
|
# 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.
|
# on the specified ikiwiki setup file.
|
||||||
#
|
#
|
||||||
# It's also possible to let a user list setup files in ~user/.ikiwiki/wikilist
|
# It's also possible to let a user list setup files in ~user/.ikiwiki/wikilist
|
||||||
|
|
Loading…
Reference in New Issue