Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split an ikiwiki

Tags:

git

wiki

ikiwiki

I am trying to split an ikiwiki into two wikis.

Suppose I have an ikiwiki called myiki (compare this question from ikiwiki.info), which contains the pages

pageA1,pageA2,...,pageB1,pageB2,...

now I want to have two wikis called myikiA and myikiB, such that:

  • myikiA contains pageA1,pageA2,...
    The history of myikiA should contain the whole history of those pages, but no history of pageB1,pageB2,...

and:

  • myikiB contains pageB1,pageB2,...
    The history of myikiB should contain the whole history of those pages but no history of pageA1,pageA2,...

In a first step I made a copy of my scrdir and tried to remove a page named foo like this (note that in the scrdir there are files called foo.mdwn and directories foo as well).
To do so, I did this command:

sudo git filter-branch --tree-filter 'find . -name foo* -exec rm -r -f  {} \;' --prune-empty -f HEAD

Rewrite 3cbc4646145e31cf7ce23d5e8397baaebab64c60 (179/1439)find: `./index/testdir/foo': No such file or directory
tree filter failed: find . -name foo* -exec rm -r -f  {} \;

Any Idea what's wrong with it?

Is there a way to give a list of pages and split the wiki as described above?

like image 435
student Avatar asked Nov 14 '22 13:11

student


1 Answers

When find finds foo/, it calls rm -rf on it and then tries to enter it to find more files. You can cause find to remove the directory and then ignore it using -prune.

find . -name foo* -exec rm -r -f {} \; -prune

like image 120
Ryan Patterson Avatar answered Nov 17 '22 05:11

Ryan Patterson