From 2f0e31888f6d1d347fe5ffb455eb6aa2ad1569c3 Mon Sep 17 00:00:00 2001 From: Semyon Pisarev Date: Sun, 15 Jan 2017 19:46:23 +0300 Subject: [PATCH] Add tiny wrapper to start from '$HOME' --- Makefile | 6 +++--- assets/osx/Alacritty.app/Contents/Info.plist | 2 +- assets/osx/Alacritty.app/Contents/MacOS/launcher | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 assets/osx/Alacritty.app/Contents/MacOS/launcher diff --git a/Makefile b/Makefile index b4bc91d0..4f4ca807 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,9 @@ $(TARGET): app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary $(APP_NAME): $(TARGET) $(APP_TEMPLATE) - @mkdir -p $(APP_DIR) - @cp -R $(APP_TEMPLATE) $(APP_DIR) - @cp $(APP_BINARY) $(APP_BINARY_DIR) + @mkdir -p $(APP_BINARY_DIR) + @cp -fRp $(APP_TEMPLATE) $(APP_DIR) + @cp -fp $(APP_BINARY) $(APP_BINARY_DIR) @echo "Created '$@' in '$(APP_DIR)'" dmg: | $(DMG_NAME) ## Pack Alacritty.app into .dmg diff --git a/assets/osx/Alacritty.app/Contents/Info.plist b/assets/osx/Alacritty.app/Contents/Info.plist index acf636e8..77053db1 100644 --- a/assets/osx/Alacritty.app/Contents/Info.plist +++ b/assets/osx/Alacritty.app/Contents/Info.plist @@ -5,7 +5,7 @@ CFBundleDisplayName Alacritty CFBundleExecutable - alacritty + launcher CFBundleName diff --git a/assets/osx/Alacritty.app/Contents/MacOS/launcher b/assets/osx/Alacritty.app/Contents/MacOS/launcher new file mode 100755 index 00000000..707c3205 --- /dev/null +++ b/assets/osx/Alacritty.app/Contents/MacOS/launcher @@ -0,0 +1,6 @@ +#!/bin/bash + +BIN_DIR=$(dirname $0) + +cd "$HOME" +exec "$BIN_DIR/alacritty" "$@"