emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dracula-theme f98f9bd 157/187: Improve a little test scrip


From: ELPA Syncer
Subject: [nongnu] elpa/dracula-theme f98f9bd 157/187: Improve a little test script
Date: Thu, 21 Oct 2021 18:05:14 -0400 (EDT)

branch: elpa/dracula-theme
commit f98f9bd54e965e8676ee15ce8b4ecbeae01341ed
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>

    Improve a little test script
---
 start_emacs_test.sh | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/start_emacs_test.sh b/start_emacs_test.sh
index 013650c..55e7cdd 100755
--- a/start_emacs_test.sh
+++ b/start_emacs_test.sh
@@ -1,21 +1,23 @@
 #!/usr/bin/env sh
 
 ARGS=
-TERM_TEST=no
-COLOR=256color
+COLOR=
 
 for arg in $*; do
     case $arg in
-       256) COLOR=256color ;;
-       88) COLOR=88color ;;
-       16) COLOR=16color ;;
-       *)
-        [ "$arg" = '-nw' ] && TERM_TEST=yes
-        ARGS="$ARGS $arg"
-        ;;
+           256|-nw) COLOR=256color ;;
+           88) COLOR=88color ;;
+           16) COLOR=16color ;;
+           *) ARGS="$ARGS $arg" ;;
     esac
 done
 
-[ "$TERM_TEST" = 'yes' ] && export TERM=xterm-$COLOR
 [ -z "$EMACS" ] && EMACS=emacs
+if [ -n "$COLOR" ]; then
+    export TERM=xterm-$COLOR
+    echo "Run in terminal as $TERM"
+    EMACS="$EMACS -nw"
+else
+    echo "Run as a graphical window"
+fi
 $EMACS -Q --debug-init -l test-profile.el $ARGS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]