From 9c615ea9cc2723cae5d0c0bf9cc9965350afebe7 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Thu, 3 May 2018 17:55:48 +0200 Subject: Testing odbc+wx on OTP 20.3 on a slim jessie (#271) * wx-20.3: seeing about kerl/kerl/issues/270 * wx-20.3: less failible test + less deps * wx-20.3: move linux tests out of TravisCI into CircleCI * wx-20.3: always use git backend (erlang.org is still down) * wx-20.3: work around fact that erlang.org is down in .travis.yml * wx-20.3: fix some things * wx-20.3: looks like skipping happens too late * Revert "wx-20.3: looks like skipping happens too late" This reverts commit e0600cefa71760e9bd74e7efc37089d5d75e764e. * wx-20.3: that should fix it * wx-20.3: run shellcheck in circle, now travis is only about osx! * wx-20.3: that did not fix it (cc @mrallen1) * wx-20.3: shellcheck stable segfaults? * wx-20.3: should fix shellcheck segfault * SC1117: Backslash is literal in "\!". Prefer explicit escaping: "\\!". Not sure about the csh one. @mcrallen1 you have a clue? * wx-20.3: SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). * wx-20.3: SC2154: words is referenced but not assigned. * wx-20.3: replace some double quotes with simple ones * wx-20.3: ps not found on debian9!? * wx-20.3: what now * wx-20.3: lets try a later vsn * wx-20.3: some cleaning up * wx-20.3: YAML fun * wx-20.3: wat --- kerl | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (limited to 'kerl') diff --git a/kerl b/kerl index 27906f3..91f804f 100755 --- a/kerl +++ b/kerl @@ -194,8 +194,7 @@ usage() { if [ $# -eq 0 ]; then usage; fi get_releases() { - if [ "$KERL_BUILD_BACKEND" = 'git' ] - then + if [ "$KERL_BUILD_BACKEND" = 'git' ]; then get_git_releases else get_tarball_releases @@ -227,8 +226,7 @@ get_tarball_releases() { } update_checksum_file() { - if [ "$KERL_BUILD_BACKEND" = 'git' ]; - then + if [ "$KERL_BUILD_BACKEND" = 'git' ]; then return 0 else echo 'Getting checksum file from erlang.org...' @@ -679,6 +677,28 @@ _do_build() { cd "$ERL_TOP" || exit 1 LOGFILE="$KERL_BUILD_DIR/$2/otp_build_$1.log" + # Set configuation flags given applications white/black lists + if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then + for app in $KERL_CONFIGURE_APPLICATIONS; do + case "$KERL_CONFIGURE_OPTIONS" in + *"--with-$app"*) + echo "Option '--with-$app' in KERL_CONFIGURE_OPTIONS is superfluous" ;; + *) + KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-$app" ;; + esac + done + fi + if [ -n "$KERL_CONFIGURE_DISABLE_APPLICATIONS" ]; then + for app in $KERL_CONFIGURE_DISABLE_APPLICATIONS; do + case "$KERL_CONFIGURE_OPTIONS" in + *"--without-$app"*) + echo "Option '--without-$app' in KERL_CONFIGURE_OPTIONS is superfluous" ;; + *) + KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --without-$app" ;; + esac + done + fi + # Check to see if configuration options need to be stored or have changed TMPOPT="/tmp/kerloptions.$$" echo "$CFLAGS" >"$TMPOPT" @@ -735,18 +755,18 @@ _do_build() { if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then find ./lib -maxdepth 1 -type d -exec touch -f {}/SKIP \; - for i in $KERL_CONFIGURE_APPLICATIONS; do - if ! rm ./lib/"$i"/SKIP; then - echo "Couldn't prepare '$i' application for building" + for app in $KERL_CONFIGURE_APPLICATIONS; do + if ! rm ./lib/"$app"/SKIP; then + echo "Couldn't prepare '$app' application for building" list_remove builds "$1 $2" exit 1 fi done fi if [ -n "$KERL_CONFIGURE_DISABLE_APPLICATIONS" ]; then - for i in $KERL_CONFIGURE_DISABLE_APPLICATIONS; do - if ! touch -f ./lib/"$i"/SKIP; then - echo "Couldn't disable '$i' application for building" + for app in $KERL_CONFIGURE_DISABLE_APPLICATIONS; do + if ! touch -f ./lib/"$app"/SKIP; then + echo "Couldn't disable '$app' application for building" exit 1 fi done @@ -935,7 +955,7 @@ function kerl_deactivate --description "deactivate erlang environment" # functions --copy complains about about fish_prompt already being defined # so we take a page from virtualenv's book . ( begin - printf "function fish_prompt\n\t#" + printf "function fish_prompt\\n\\t#" functions _kerl_saved_prompt end | psub ) functions --erase _kerl_saved_prompt @@ -993,7 +1013,7 @@ ACTIVATE_FISH # This file must be used with "source bin/activate.csh" *from csh*. # You cannot run it directly. -alias kerl_deactivate 'test \$?_KERL_SAVED_PATH != 0 && setenv PATH "\$_KERL_SAVED_PATH" && unset _KERL_SAVED_PATH; rehash; test \$?_KERL_SAVED_MANPATH != 0 && setenv MANPATH "\$_KERL_SAVED_MANPATH" && unset _KERL_SAVED_MANPATH; test \$?_KERL_SAVED_REBAR_PLT_DIR != 0 && setenv REBAR_PLT_DIR "\$_KERL_SAVED_REBAR_PLT_DIR" && unset _KERL_SAVED_REBAR_PLT_DIR; test \$?_KERL_ACTIVE_DIR != 0 && unset _KERL_ACTIVE_DIR; test \$?_KERL_DOCSH_USER_DEFAULT != 0 && unsetenv DOCSH_USER_DEFAULT && unset _KERL_DOCSH_USER_DEFAULT; test \$?_KERL_DOCSH_DOT_ERLANG != 0 && rm "\$HOME/.erlang" && unset _KERL_DOCSH_DOT_ERLANG; test \$?_KERL_SAVED_PROMPT != 0 && set prompt="\$_KERL_SAVED_PROMPT" && unset _KERL_SAVED_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' +alias kerl_deactivate 'test \$?_KERL_SAVED_PATH != 0 && setenv PATH "\$_KERL_SAVED_PATH" && unset _KERL_SAVED_PATH; rehash; test \$?_KERL_SAVED_MANPATH != 0 && setenv MANPATH "\$_KERL_SAVED_MANPATH" && unset _KERL_SAVED_MANPATH; test \$?_KERL_SAVED_REBAR_PLT_DIR != 0 && setenv REBAR_PLT_DIR "\$_KERL_SAVED_REBAR_PLT_DIR" && unset _KERL_SAVED_REBAR_PLT_DIR; test \$?_KERL_ACTIVE_DIR != 0 && unset _KERL_ACTIVE_DIR; test \$?_KERL_DOCSH_USER_DEFAULT != 0 && unsetenv DOCSH_USER_DEFAULT && unset _KERL_DOCSH_USER_DEFAULT; test \$?_KERL_DOCSH_DOT_ERLANG != 0 && rm "\$HOME/.erlang" && unset _KERL_DOCSH_DOT_ERLANG; test \$?_KERL_SAVED_PROMPT != 0 && set prompt="\$_KERL_SAVED_PROMPT" && unset _KERL_SAVED_PROMPT; test "!:*" != "nondestructive" && unalias deactivate' # Unset irrelevant variables. kerl_deactivate nondestructive -- cgit v1.2.3