From 8e7deb76ef61143714c96be71b9c47902de69e61 Mon Sep 17 00:00:00 2001 From: Joseph Wayne Norton Date: Wed, 23 Oct 2013 22:32:32 -0500 Subject: Add support for disabling apps to build via KERL_CONFIGURE_DISABLE_APPLICATIONS If non-empty, you can specify the subset of applications to disable when building (and subsequent installing) Erlang/OTOP with the KERL_CONFIGURE_DISABLE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line. e.g. KERL_CONFIGURE_DISABLE_APPLICATIONS="odbc" --- kerl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'kerl') diff --git a/kerl b/kerl index 7af030f..2560571 100755 --- a/kerl +++ b/kerl @@ -34,6 +34,9 @@ fi if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then _KCA="$KERL_CONFIGURE_APPLICATIONS" fi +if [ -n "$KERL_CONFIGURE_DISABLE_APPLICATIONS" ]; then + _KCDA="$KERL_CONFIGURE_DISABLE_APPLICATIONS" +fi if [ -n "$KERL_SASL_STARTUP" ]; then _KSS="$KERL_SASL_STARTUP" fi @@ -45,6 +48,7 @@ if [ -n "$KERL_DEPLOY_RSYNC_OPTIONS" ]; then fi KERL_CONFIGURE_OPTIONS= KERL_CONFIGURE_APPLICATIONS= +KERL_CONFIGURE_DISABLE_APPLICATIONS= KERL_SASL_STARTUP= KERL_INSTALL_MANPAGES= @@ -60,6 +64,9 @@ fi if [ -n "$_KCA" ]; then KERL_CONFIGURE_APPLICATIONS="$_KCA" fi +if [ -n "$_KCDA" ]; then + KERL_CONFIGURE_DISABLE_APPLICATIONS="$_KCDA" +fi if [ -n "$_KSS" ]; then KERL_SASL_STARTUP="$_KSS" fi @@ -292,6 +299,15 @@ do_git_build() fi done fi + if [ -n "$KERL_CONFIGURE_DISABLE_APPLICATIONS" ]; then + for i in $KERL_CONFIGURE_DISABLE_APPLICATIONS; do + touch -f ./lib/$i/SKIP + if [ $? -ne 0 ]; then + echo "Couldn't disable '$i' application for building" + exit 1 + fi + done + fi ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 if [ $? -ne 0 ]; then echo "Build error, see $LOGFILE" @@ -366,6 +382,15 @@ do_build() fi done fi + if [ -n "$KERL_CONFIGURE_DISABLE_APPLICATIONS" ]; then + for i in $KERL_CONFIGURE_DISABLE_APPLICATIONS; do + touch -f ./lib/$i/SKIP + if [ $? -ne 0 ]; then + echo "Couldn't disable '$i' application for building" + exit 1 + fi + done + fi ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 if [ $? -ne 0 ]; then echo "Build failed, see $LOGFILE" -- cgit v1.2.3