Debian Codegraph @

doc/forum/refresh_and_setup/comment_2_e2476f834f9bc8fe753783e209321d4e._comment

raw
1 [[!comment format=mdwn
2 username="smcv"
3 subject="comment 2"
4 date="2015-03-01T15:13:08Z"
5 content="""
6 > ikiwiki --setup $setupfile
7 >
8 > Didn't work as expected, rebuilt the whole wiki.
9
10 The default action is to rebuild if `--setup` is used, or refresh otherwise.
11
12 > ikiwiki -setup -refresh $setupfile
13 >
14 > Output was:
15 >
16 > cannot read -refresh: No such file or directory
17
18 Well, no, you told ikiwiki to use a setup file named `-refresh`. That's not
19 going to work, unless you happen to have such a file. The man page does say
20
21 > --setup setupfile
22
23 implying that an argument is expected and required. Either of these would be OK,
24 for instance:
25
26 ikiwiki -refresh -setup setupfile
27 ikiwiki --setup setupfile --refresh
28
29 > 2.a) It is the only place where *-setup* is used. the error output and the manpage use *--setup*
30
31 Perl's command-line parser accepts either.
32
33 > 3.) The file with the basic settings for the installation procedure is referred to as \"setup\" file. And so are the files with the settings for a particular wiki.
34
35 That's because the one used for the auto-installation (which is not mandatory: you can
36 write the entire setup file yourself if you prefer, like ikiwiki-hosting does) is a
37 special case of the one used for a configured wiki./
38
39 > And maybe it would be possible to update a wiki if the program is called with only a config file as parameter.
40
41 ikiwiki needs either:
42
43 * two non-option arguments, a srcdir *and* a destdir (and probably lots of other options
44 in practice); or
45
46 * a setup file (which can specify most things supported by the command line) and
47 no non-option arguments
48
49 Both ways are meant to work; the srcdir/destdir syntax is for very simple
50 cases (e.g. building static documentation) and the setup file is for
51 more complicated cases (entire websites).
52
53 Treating two non-option arguments as srcdir/destdir, but a single
54 non-option argument as a setup file, seems more confusing to me
55 than the current situation.
56 """]]