From b5f9087e586361baa3f4bd761c4286d50dd66a34 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sun, 11 Aug 2019 11:34:52 -0500 Subject: [PATCH] Tests: Update makem.sh --- makem.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/makem.sh b/makem.sh index 909d9eb..07b8308 100755 --- a/makem.sh +++ b/makem.sh @@ -147,11 +147,20 @@ EOF # ** Emacs function run_emacs { - debug "run_emacs: emacs -Q --batch -L \"$load_path\" --load=$package_initialize_file $@" + debug "run_emacs: emacs -Q --batch --load=$package_initialize_file -L \"$load_path\" $@" + if [[ $debug_load_path ]] + then + debug $(emacs -Q --batch \ + --load=$package_initialize_file \ + -L "$load_path" \ + --eval "(message \"LOAD-PATH: %s\" load-path)" \ + 2>&1) + fi output_file=$(mktemp) - emacs -Q --batch -L "$load_path" \ + emacs -Q --batch \ --load=$package_initialize_file \ + -L "$load_path" \ "$@" \ &>$output_file @@ -239,11 +248,11 @@ function cleanup { function echo_color { # This allows bold, italic, etc. without needing a function for # each variation. + local color_code="COLOR_$1" + shift + if [[ $color ]] then - local color_code="COLOR_$1" - shift - echo -e "${!color_code}${@}${COLOR_off}" else echo "$@" @@ -322,6 +331,8 @@ Options: -h, --help I need somebody! -v, --verbose Increase verbosity, up to -vv. + --debug-load-path Print load-path. + -f FILE, --file FILE Check FILE in addition to discovered files. --no-color Disable color output. @@ -462,7 +473,7 @@ COLOR_white='\e[0;37m' # * Args -args=$(getopt -n "$0" -o dhvf:C -l debug,help,verbose,file:,no-color,no-compile -- "$@") || { usage; exit 1; } +args=$(getopt -n "$0" -o dhvf:C -l debug,debug-load-path,help,verbose,file:,no-color,no-compile -- "$@") || { usage; exit 1; } eval set -- "$args" while true @@ -472,6 +483,9 @@ do debug=true verbose=2 ;; + --debug-load-path) + debug_load_path=true + ;; -h|--help) usage exit