machinekit / machinekit-docs

Machinekit website
http://www.machinekit.io
16 stars 54 forks source link

add missing echo argument #240

Closed machinekoder closed 7 years ago

ArcEye commented 8 years ago

I don't actually like these instructions at all. Using a double quoted string to sh, containing a single quoted string to echo which in turn contains a double quoted string, plus all sorts of escaped characters just begs problems.

The change suggested, whilst it should cause echo to deal with escape characters, actually produces an entry in ~/bashrc that begins with -e, because of the earlier quoting to sh probably.

I would suggest that from the command line, this produces the required entry, with no escaped quote chars , newlines or indeed the use of sh to write to a bash config file

echo 'if [ -f ~/machinekit/scripts/rip-environment ]; then \
    source ~/machinekit/scripts/rip-environment \
    echo "Environment set up for running Machinekit" \
fi' >> ~/.bashrc
machinekoder commented 8 years ago

Good point. Can you please create a PR

ArcEye commented 8 years ago

Will do, I have had a broadband outage, so will be tomorrow.

ArcEye commented 7 years ago

This has been merged here https://github.com/machinekit/machinekit-docs/commit/dd76908c159cc17b27db30ff85564ecaf81a0d12