summaryrefslogtreecommitdiff
path: root/emacs-helm.sh
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-09-24 12:40:38 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-09-24 12:40:38 +0200
commit957bf806a16ec3fb6f36f6d5f8d08767483e520d (patch)
tree6c4b1e98cc09b70824488a61adb9b65e9b9bd719 /emacs-helm.sh
parent51a6042ec3e0a0a9faf92addef7a5f15a71886f8 (diff)
* emacs-helm.sh: Fix when $0 is not a symlink (#631).
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-xemacs-helm.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/emacs-helm.sh b/emacs-helm.sh
index c79171ca..ef5db305 100755
--- a/emacs-helm.sh
+++ b/emacs-helm.sh
@@ -42,13 +42,16 @@ esac
# 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
+ AUTO_FILE="$(dirname $LS)/helm-autoloads.el"
+else
+ AUTO_FILE="helm-autoloads.el"
+fi
+if [ ! -f "$AUTO_FILE" ]; then
+ echo No autoloads found, please run make first to generate autoload file
+ exit 2
fi
+
cat > $TMP <<EOF
(setq initial-scratch-message (concat initial-scratch-message
";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\