Background
I'm using the Digital Ocean API to create a new server (droplet) and including a bash script to be automatically run when the server starts up the first time.
Problem
In my bash script (which runs as root), I try to install Oh-My-Zsh via its shell script, which tries to install it in ~
. However, when I ssh into the machine, I find that Oh-My-Zsh has been installed into /~/
instead of /root
.
Question
What could be causing bash to interpret ~
as the name of a folder instead of as an alias for $HOME
, and is there anything I can do to fix this? The Oh My Zsh install script is not owned by me, so I can't simply change each ~
to $HOME
or /root
(of course I could hack together a sed command to do the replacement for me in that install script, but it seems like there should be an easier way...)