syscfg/emacs/module/module-automount.el

27 lines
674 B
EmacsLisp

;;; module-alioth.el --- alioth automounts -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(defun ensure-alioth-mounted ()
"Check if ~/alioth is mounted, and if not, mount it."
(unless (file-exists-p "~/alioth/.exists")
(mount-alioth-sshfs)))
(defun umount-alioth-sshfs ()
"Unmount Alioth Uberspace using SSHFS."
(interactive)
(let ((default-directory "~"))
(shell-command "umount ~/alioth")))
(defun mount-alioth-sshfs ()
"Mount Alioth Uberspace using SSHFS."
(interactive)
(let ((default-directory "~"))
(shell-command "sshfs lkn@alioth.uberspace.de:/home/lkn/ ~/alioth")))
(provide 'module-alioth)
;;; module-alioth.el ends here.