Skip to content

Commit

Permalink
Add support for agnerized rebar installation
Browse files Browse the repository at this point in the history
  • Loading branch information
scalone-cw committed May 9, 2024
1 parent 6c06785 commit 34321cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Now install a build to some location (optionally you can disable agner support b
Later on, you can leave the installation typing:
kerl_deactivate

Note that you can install an agnerized version of rebar along with agner using KERL_INSTALL_AGNERIZED_REBAR in your .kerlrc file or on the command line.

Here again you can check the installation's been registered:

$ kerl list installations
Expand Down
13 changes: 7 additions & 6 deletions kerl
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ do_update_agner()
fi
TARGET="$KERL_BUILD_DIR/$1/release_$rel"
cd "$KERL_BUILD_DIR/$1/agner_$rel" && \
git pull &&
PATH="$KERL_BUILD_DIR/$1/otp_src_$rel/bin:$PATH" \
AGNER_BIN="$TARGET/bin" AGNER_EXACT_PREFIX="$TARGET/lib" \
./agner install agner > /dev/null 2>&1
make > /dev/null 2>&1
if [ "$?" -eq 1 ]; then
return 1
fi
Expand Down Expand Up @@ -262,7 +262,6 @@ do_git_build()
git clone https://github.com/agner/agner.git agner_git > /dev/null 2>&1 && \
cd agner_git && \
PATH="$KERL_BUILD_DIR/$3/otp_src_git/bin:$PATH" make > /dev/null 2>&1 && \
do_update_agner $3
if [ "$?" -eq 1 ]; then
echo "Agner install failed"; exit 1
fi
Expand Down Expand Up @@ -322,7 +321,6 @@ do_build()
git clone https://github.com/agner/agner.git agner_$1 > /dev/null 2>&1 && \
cd agner_$1 && \
PATH="$KERL_BUILD_DIR/$2/otp_src_$1/bin:$PATH" make > /dev/null 2>&1 && \
do_update_agner $2
if [ "$?" -eq 1 ]; then
echo "Agner install failed"; exit 1
fi
Expand Down Expand Up @@ -406,8 +404,11 @@ fi
ACTIVATE
if agner_support $1; then
echo "Installing agner in $absdir..."
cp -R "$KERL_BUILD_DIR/$1/release_$rel/lib/agner-@master" "$absdir/lib/"
cd "$absdir/bin" && ln -s "$absdir/lib/agner-@master/bin/agner" agner
cp "$KERL_BUILD_DIR/$1/agner_$rel/agner" "$absdir/bin/"
if [ -n "$KERL_INSTALL_AGNERIZED_REBAR" ]; then
echo "Installing agnerized rebar in $absdir..."
cp "$KERL_BUILD_DIR/$1/agner_$rel/agner" "$absdir/bin/rebar"
fi
if [ -n "$KERL_AGNER_AUTOINSTALL" ]; then
for i in $KERL_AGNER_AUTOINSTALL; do
echo "Autoinstalling $i"
Expand Down

0 comments on commit 34321cc

Please sign in to comment.