Created
January 23, 2018 17:39
-
-
Save rubysolo/c78f55690b9cf2ff015b6ec049cfe07f to your computer and use it in GitHub Desktop.
Docker mix install helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# manually download and "install" a given mix dep for non-elixir environment | |
# | |
# for example, download phoenix in a frontend build stage to get JS deps | |
depname=$1 | |
version=$(grep "\"$depname\"" mix.lock | cut -d, -f 3 | sed -e 's/ *"//g') | |
echo "installing $depname version $version..." | |
mkdir -p deps | |
cd deps | |
wget https://s3.amazonaws.com/s3.hex.pm/tarballs/$depname-$version.tar | |
mkdir $depname | |
tar xf $depname-*.tar -C $depname | |
cd $depname | |
tar zxf contents.tar.gz | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment