As pointed out in the removed comments, this doesn't seem to do
what it was added for. The initial motivation comes from
http://cygwin.com/ml/cygwin/2012-01/msg00201.html but the lower
case tmp/temp don't seem to affect Windows programs.
GetTempPath() and GetEnvironmentStrings() see the uppercase version
here, so do perl and ruby. Only python for some reason prefers
the lowercase version.
Also cygwin and git-for-windows removed this long ago.
Avoid the confusion and remove both env vars.
We now provide ~/.inputrc as /etc/inputrc since fd25584fe3
This means that on the first start we will execute /profile, which
writes various bash related files to $HOME, which bash will execute
after /profile is finished.
So with ~/.inputrc out of the way the environment on the first start
should be the same as the second one, so we can remove the restart
warning at the beginning.
The question remains if we should still call "clear" at the end, hiding
the setup process. I decided for removing it and enclosing the setup with
some colored status message. This hopefully is not too confusing for
users seeing the intial process and still allows an easy way to see the logs
if something goes wrong.
The main reason we have the first install warning still is that we
fill $HOME with bash related scripts that will only get executed
on the next login shell.
Simplify things by keeping MAYBE_FIRST_START logic in one file
and make it depend on wether $HOME was missing at the beginning.
Inline the call to cygpath into the loop to avoid it being
called in case all files already exist.
Remove call to chmod, it doesn't do anything in MSYS2.
Saves ~20ms here
It is undocumented and hasn't been touched in 8+ years.
If someone is missing it we can include it in dev-tools or
some other msys2 developer oriented package.
Current cygwin fails to delete or create /dev, since it's always
available as a virtual directory. rm fails because it's not empty
and mkdir fails because it already exists.
We could shell out to cmd.exe, but let's just continue to assume that
/dev exists in the installer base.
Also saves a useless mkdir call.
Gentoo has now moved the wrappers into their own git repo
and versions them in one.
To keep things simple, follow their lead and build both wrapper
packages in one PKGBUILD.