Added bash commands for replacing .hgignore with .gitignore
This commit is contained in:
parent
b87a3e00eb
commit
57ba7953bf
11
hg2git.cf
11
hg2git.cf
|
@ -36,11 +36,12 @@ for branch in `cat closed.log`; do git tag "closed/$branch" $branch; git branch
|
||||||
git checkout master -f
|
git checkout master -f
|
||||||
git clean -df
|
git clean -df
|
||||||
* create .gitignore:
|
* create .gitignore:
|
||||||
* `find -name ".hgignore"` to find all .hgignore files
|
find . -name ".hgignore" > hgignore-files.log
|
||||||
* rename all .hgignore to .gitignore
|
for file in `cat hgignore-files.log`; do
|
||||||
* rewrite anything under "syntax: regexp" to glob form
|
newfile=${file/hgignore/gitignore};
|
||||||
* remove "syntax: {glob|regexp}" lines
|
cp $file $newfile;
|
||||||
* stage and commit all .gitignore files
|
sed -E -i.bak "s/syntax:/#syntax:/; s/^\^//; s/\$$//; s/\\\w\+/*/; s/\\\\\//\//g" $newfile; #optional
|
||||||
|
done
|
||||||
|
|
||||||
# OTHER TASKS
|
# OTHER TASKS
|
||||||
* cloning repo with all branches:
|
* cloning repo with all branches:
|
||||||
|
|
Loading…
Reference in New Issue