changeset 587:af3762ec58ba

Fix: stat: cannot stat ‘...’: No such file or directory [: !=: unexpected operator
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sun, 05 Apr 2015 21:10:36 +0300
parents f7c6b4b90147
children e5ee69ef1a84
files emacs/e
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/emacs/e	Wed Mar 25 18:41:49 2015 +0200
+++ b/emacs/e	Sun Apr 05 21:10:36 2015 +0300
@@ -29,7 +29,7 @@
 fi
 
 f=`readlink -f "$1"`
-if [ -e "$f" ] && [ `stat -c %U "$f"` != $USER ] || [ -e "${f%/*}" -a `stat -c %U "${f%/*}"` != $USER ]; then
+if [ -e "$f" ] && [ `stat -c %U "$f"` != $USER ] || [ -e "${f%/*}" ] && [ `stat -c %U "${f%/*}"` != $USER ]; then
     shift
     exec emacsclient $ERAGS -- "/sudo::$f" "$@"
 fi