summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Othacehe <mathieu.othacehe@parrot.com>2018-02-08 14:06:09 +0100
committerClément Lassieur <clement.lassieur@parrot.com>2018-02-12 10:54:24 +0100
commit8e99df1aa0997adbe160b5d41e4d30ee7d44555e (patch)
tree02d7f0895f1518ce79fba635eb77ea5bec0c7a8d
parent806eafdc106289e2510ef7b104768f9dfc737560 (diff)
downloadparrot-8e99df1aa0997adbe160b5d41e4d30ee7d44555e.tar.gz
remove yterm (moved to oe).
-rw-r--r--parrot-alchemy.el8
-rw-r--r--parrot-yterm.el72
2 files changed, 4 insertions, 76 deletions
diff --git a/parrot-alchemy.el b/parrot-alchemy.el
index 8203399..f858d11 100644
--- a/parrot-alchemy.el
+++ b/parrot-alchemy.el
@@ -120,13 +120,13 @@
(defun alchemy-sync (name path)
(interactive)
- (yterm-screen
+ (oe-term-screen
(format "%s-sync" name)
(format "cd %s && repo sync" path)))
(defun alchemy-sync-d (name path)
(interactive)
- (yterm-screen
+ (oe-term-screen
(format "%s-sync-d" name)
(format "cd %s && repo sync -d" path)))
@@ -160,7 +160,7 @@
exception-paths)
") | tee /dev/tty | gtags -v -f -")
" ")))
- (yterm-screen (format "%s-gtags" name) command)))
+ (oe-term-screen (format "%s-gtags" name) command)))
(defun alchemy-linux-gtags (name path)
(interactive)
@@ -170,7 +170,7 @@
(format "cd %s/packages/linux*" path)
"&& rm -f GPATH GRTAGS GTAGS && gtags -v")
" ")))
- (yterm-screen (format "%s-linux-gtags" name) command)))
+ (oe-term-screen (format "%s-linux-gtags" name) command)))
(defun alchemy-crashdump-to-links (_name product path)
(interactive)
diff --git a/parrot-yterm.el b/parrot-yterm.el
deleted file mode 100644
index 8b5c812..0000000
--- a/parrot-yterm.el
+++ /dev/null
@@ -1,72 +0,0 @@
-;;; -*- lexical-binding: t -*-
-
-(defun yterm-colorize (s color)
- (format "\e[%dm\e[1m%s\e[0m" color s))
-
-(defun yterm-bash-init (args &optional host)
- (let* ((default-directory "~")
- (tmpfile (make-temp-file "bash-init-")))
- (with-temp-file tmpfile
- (insert ". /etc/profile && . ~/.bash_profile\n")
- (let ((counter 0))
- (dolist (arg args)
- (insert (format "history -s '%s'\n" arg))
- (insert (format "echo '%s'\n" (yterm-colorize arg 34)))
- (insert (format "%s\n" arg))
- (insert (format "RES%s=$?\n" counter))
- (insert (format "if [ $RES%s -eq 0 ]; then\n" counter))
- (insert (format " OUTPUT%s=\"%s %s\"\n"
- counter arg (yterm-colorize "succeeded" 32)))
- (insert (format " echo %s\n" (yterm-colorize "succeeded" 32)))
- (insert (format "else\n"))
- (insert (format " OUTPUT%s=\"%s %s ($RES%s)\"\n"
- counter arg (yterm-colorize "failed" 31) counter))
- (insert (format " echo \"%s ($RES%s)\"\n"
- (yterm-colorize "failed" 31) counter))
- (insert (format "fi\n"))
- (insert "echo\n")
- (setq counter (1+ counter)))
- (dotimes (i counter)
- (insert (format "echo $OUTPUT%s\n" i)))))
- (when host
- (shell-command (format "scp %s %s:%s" tmpfile host tmpfile)))
- ;; https://serverfault.com/a/586272
- (format "bash --init-file %s" tmpfile)))
-
-(defun yterm-dumb (name arg)
- (let* ((name-without-spaces (replace-regexp-in-string " " "-" name))
- (buffer-name (format "*XTerm-%s*" name-without-spaces)))
- (start-process-shell-command
- "yterm" nil
- ;; XTerm prefix allows to get C-c binding
- (format "xterm -class %s -e %s" buffer-name arg))))
-
-;;;###autoload
-(defun yterm (name &rest args)
- (yterm-dumb name (yterm-bash-init args)))
-
-;;;###autoload
-(defun yterm-screen (name &rest args)
- (yterm-dumb name (format "screen -S %s %s"
- name (yterm-bash-init args))))
-
-;;;###autoload
-(defun yterm-ssh (name host &rest args)
- (if (string= (system-name) host)
- (apply 'yterm name args)
- (yterm-dumb name
- (format "ssh -t %s %s" host (yterm-bash-init args host)))))
-
-(defun yterm-dumb-ssh (name host arg)
- (if (string= (system-name) host)
- (yterm-dumb name arg)
- (yterm-dumb
- name (format "ssh -t %s '. /etc/profile && . ~/.bash_profile && %s'"
- host arg))))
-
-;;;###autoload
-(defun yterm-ssh-screen (name host &rest args)
- (yterm-dumb-ssh name host (format "screen -S %s %s"
- name (yterm-bash-init args host))))
-
-(provide 'parrot-yterm)