* create the `etc` directory (if needed)
.# DISCUSSION
`bash` requires the `etc` directory for startup. However, `etc` is missing
from the GOW repo. There are current pull requests fixing this issue (see
bmatzelle/gow#192). But, this fixes the the issue while waiting for the GOW
repo to be updated. The fix here is compatible with all of the current possible
future GOW repo fixes.
* change method of generating gow.bat to generate a normal ASCII character file
.# DISCUSSION
At the PowerShell command line, using `echo STRING > FILE` will generate a
UTF-8-BOM or UTF-16-BOM encoded file. But, CMD interprets files as using the
128-character ASCII character set (character codes 0 to 127). CMD will tolerate
files using the full 256 character "extended-ASCII" set (or even larger
dual-byte character sets). But, in this circumstance, interpretation/display
is dependent on the currently selected code page. It's best to stick to pure
ASCII files if at all possible.
Using `STRING | Set-Content FILE` instead creates the correct ASCII character file.
NOTE: ASCII (not "extended-ASCII") and UTF-8 (non-BOM) encoded files are exactly equivalent.
ref: [Unicode UTF and BOM] http://www.unicode.org/faq/utf_bom.html @@ https://archive.is/TKnyk
ref: [Unicode and NET] http://csharpindepth.com/Articles/General/Unicode.aspx @@ https://archive.is/czs89
* disable the File::HomeDir override performed by Portable.pm
- achieved by removing the HomeDir section from "portable.perl" via post_install
- ref: https://rt.cpan.org/Ticket/Display.html?id=105395 @@ https://archive.is/q7BYq
.# DISCUSSION
Strawberry Portable Perl is written to be usable from a non-privileged
storage location, such as a plug-in USB drive. So, it is designed to be
usable without access to the host filesystem beyond it's own directory.
As part of the machinations making this possible, Portable.pm overrides
File::HomeDir to return resultant paths which are within the perl installation
directory (specifically, "<INSTALL_DIR>/data"). Obviously, this obscures the
user's true home directory and can be very inconvenient for common perl
scripts which depend on access to data within the user's home directory
(i.e., reading ".netrc").
This override/redirection is unnecessary for an installation by the user
into the usual host filesystem (such as is done via `scoop`). Such an
install has user level privileges and will be able to access any
user-accessible portion of the file system.