Closed lingo closed 13 years ago
This is not Ubuntu specific. The script depends on bash, it just works because it assumes that sh is bash in most systems, which is true for a lot of them. Ubuntu uses dash. So the fix is not Ubuntu specific, but it helps it work in Ubuntu ;).
In Debian squeeze by default /bin/sh is symlinked to dash, that does not handle [[ ]]. Please use /bin/bash explicitily :)
Yep. You're right. The scripts have a dependency on bash. Which I just made explicit.
Once the scripts were converted to #!/bin/bash, the \t and \n escapes stopped working in echo statements. And the -e flag fixed that. So I've added your change, though you missed a couple of places that needed -e.
Thanks!
And thanks, jneves and GabrieleV for reviewing and helping to determine the underlying issue.
You're welcome :D I'm a git noob, so please excuse me if I made mistakes forking, pulling, pushing or merging stuffs ;) Do I need to cleanup something here ?
Hi there, I added a minor fix which makes this work on my Ubuntu 10.10. system. Initially the script failed to run:
./git-svn-migrate.sh ./git-svn-migrate.sh: 122: [[: not found
I altered the script to use bash as interpreter, which handles the double-square-bracket. I also altered the echo commands to use the -e switch so that the \n and \t characters were interpreted properly as escapes.
Obviously these things are system-dependent, so I'm not sure if you want to pull these changes.
Cheers,