diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-09-24 08:24:33 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-09-24 08:24:33 +0200 |
commit | 51a6042ec3e0a0a9faf92addef7a5f15a71886f8 (patch) | |
tree | 3bf318019904da5563fbac908afd2430e8926005 /emacs-helm.sh | |
parent | d649d73d2aa0c59c269d33732e9f0d54b82e11ca (diff) |
* emacs-helm.sh: Fix when the file is a symlink (#631).
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-x | emacs-helm.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/emacs-helm.sh b/emacs-helm.sh index 09caad4b..c79171ca 100755 --- a/emacs-helm.sh +++ b/emacs-helm.sh @@ -37,9 +37,16 @@ case $1 in ;; esac -if [ ! -f "helm-autoloads.el" ]; then - echo No autoloads found, please run make first to generate autoload file - exit 2 +# Check if autoload file exists. +# It is maybe in a different directory if +# emacs-helm.sh is a symlink. +LS=$(ls -ld $0 | awk '{print $11}') +if [ ! -z $LS ]; then + DIR=$(dirname $LS) + if [ ! -f "$DIR/helm-autoloads.el" ]; then + echo No autoloads found, please run make first to generate autoload file + exit 2 + fi fi cat > $TMP <<EOF |