Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion {{ cookiecutter.format }}/installer/scripts/postinstall
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/sh
echo "Post installation process started"

{% if cookiecutter.console_app %}
if [ ! -d "/usr/local/bin" ]; then
echo "Creating /usr/local/bin directory"
mkdir -p /usr/local/bin
fi

echo "Install binary symlink"
ln -si "/Library/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/{{ cookiecutter.formal_name }}" /usr/local/bin/{{ cookiecutter.app_name }}
{% endif %}
# Run the user-provided post-install script, if one was included.
if [ -e "$(dirname "$0")/_postinstall" ]; then
echo "Running post-install script"
"$(dirname "$0")/_postinstall"
fi

echo "Post installation process finished"
Loading