* Make installation script respect $XDG_DATA_HOME
* Add os check to determine INSTALL_DIR default location
* Minor refactor
* Use `test -n` with double quotes
* Fix space in directory name issue
* Create yellow-otters-develop.md
Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
* Use separate config file for fish config
* Update installation test for new fish config location
* Update README for new fish config location
* Fix misspelling of conf.d in README
Co-authored-by: James Chen-Smith <15643597+jameschensmith@users.noreply.github.com>
Co-authored-by: James Chen-Smith <15643597+jameschensmith@users.noreply.github.com>
This is done by pinning gmp to a fork of `esy-packages/esy-gmp` that uses the `--enable-fat` argument, suggested by @ulrikstrid.
Here's the description of the open PR for `esy-packages/esy-gmp` https://github.com/esy-packages/esy-gmp/pull/3:
> GMP uses [Intel ADX](https://en.wikipedia.org/wiki/Intel_ADX) to do math stuff when capable for performance reasons. The pick whether to use ADX or not is being chosen on compile time, unless you specify `--enable-fat` which creates a "fat" binary that decides on runtime whether to use these custom instructions:
>
> > Using --enable-fat selects a “fat binary” build on x86, where optimized low level subroutines are chosen at runtime according to the CPU detected. This means more code, but gives good performance on all x86 chips. (This option might become available for more architectures in the future.)
>
> Without this flag, users can get "illegal hardware instruction" errors when running their binaries on a machine without Intel ADX.
>
> So, in other words, this PR enables building gmp into a binary on CI which _has Intel ADX_, and then using it on a machine that does not have it (like AMD or older Intels)
>
> To me, it sounds like a sane default.
Github URLS are different between release/version so check during
download and install using the correct path.
Adding in a check for if the curl command fails to download.
What are your thoughts on parameterizing the install script for local install? I know this seems weird but it means that I don't have to rely on developers having any tools already installed except bash and some way to edit the files. Here is an actual example script setup I would use.
Here is an example local install script `installLocal.sh`
```bash
#!/usr/bin/env bash
DESIRED_NODE_VERSION=v$(cat package.json | grep -Ei "\"node\"" | grep -Eoi "[0-9]+\.[0-9]+\.[0-9]+")
export FNM_DIR="$(pwd)/.fnm"
if [ ! -d "$FNM_DIR" ]; then
curl 'https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh' | INSTALL_DIR=`pwd` bash
fi
set -e
NODE_DIR="$FNM_DIR/node-versions/$DESIRED_NODE_VERSION/installation/bin"
export PATH=$FNM_DIR:$NODE_DIR:$PATH
#TODO: support fish
eval `fnm env --multi`
if [ ! -f "$NODE_DIR/node" ]; then
fnm install $DESIRED_NODE_VERSION
fi
sumOfPackageJson() {
cat package.json | md5sum | cut -d' ' -f1
}
if [ ! -f ".packageRevision" ] || [ "$(cat .packageRevision)" != "$(sumOfPackageJson)" ]; then
sumOfPackageJson > .packageRevision
npm install
fi
```
then in script called `nodew`
```bash
#!/usr/bin/env bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
source ./installLocal.sh
node "$@"
```
and `npmw`
```bash
#!/usr/bin/env bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
source ./installLocal.sh
npm "$@"
```
and for completeness sake I usually go one step further and do an `appw`
```bash
#!/usr/bin/env bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
source ./installLocal.sh
node ./app/index.js "$@"
```
* Use variants instead of a boolean
* Add infrastructure for multishell and aliases: Aliases are required because I want to have a default node version on startup
* create alias command
* fmt
* Added aliases (Fixes#29) and opt-in multishell support (Fixes#19)
* Better docs
* update snapshot
* Some/Fail => Some/None
* add lint-staged
* use refmt and all of prettier are grouped
* System.readdir => Fs.readdir (now uses Lwt)
* use lstat for file_exists: check if symlink exists instead of actual linked file. also, initialize the Random seed on Env
* Remove fish set options that were added in trial and error
* Bootstrap script
* add bootstrap documentation
* Add a LICENSE file
* added license, thanks @bnb
* script to print licenses
* Change to GPL v3
I believe it is necessary because of fnm's dependencies. If it's not, I'd be happy to make it more open
* Update package.json
This PR adds a script that generates a new Reason module named `Fnm__Package` and a script that verifies that it is up to date.
`Fnm__Package` will have `package.json` information necessary for the app, like its version.
Unfortunately, [`husky` doesn't work with esy](https://github.com/esy/esy/issues/623) so I can't use it for generating git hooks and have a `pre-commit` script that verifies `Fnm__Package` and reformats using `refmt`