In my bash script I have:
echo -e '#!/bin/sh /n GIT_WORK_TREE=/home/realopti/domains/$name git checkout -f' >> ~/domains/$name.git/hooks/post-receive
This generates:
#!/bin/sh /n GIT_WORK_TREE=/home/realopti/domains/john git checkout -f
in my post-receive file.
I'd like the file to look like:
#!/bin/sh
GIT_WORK_TREE=/home/realopti/domains/john git checkout -f
How can I make this happen.
Thank you,
Bill
That should be \n, not /n. You may also want to remove the space after it, but it doesn't matter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With