5 my $etcfile="/etc/ikiwiki/wikilist";
19 print STDERR "warning: $setup does not exist, skipping\n";
22 print "Processing $setup as user ".username()." ...\n";
23 my $ret=system("ikiwiki", "-setup", $setup, @ARGV);
25 print STDERR "warning: processing $setup failed with code $ret\n";
32 return if $user=~/^-/ || $users{$user};
34 my $ret=system("su", $user, "-s", "/bin/sh", "-c", "--", "$0 --nonglobal @ARGV");
36 print STDERR "warning: processing for $user failed with code $ret\n";
43 return unless -e $file;
46 open ($list, "<$file") || die "$file: $!";
51 next if /^#/ || ! length;
52 if (/^([-\w]+)\s+([^\s]+)$/) {
59 if (username() eq $user) {
64 elsif (/^([-\w]+)$/) {
70 my $home=(getpwnam($user))[7];
71 if (defined $home && -d $home) {
72 my $dotfile="$home/.ikiwiki/wikilist";
73 processlist($dotfile);
81 if (@ARGV && $ARGV[0] eq "--nonglobal") {
83 # avoid recursively processing if the wikilist file has a root
90 processlist($etcfile);