Skip to content

Commit 9ebf81f

Browse files
committed
Run a user-provided post-install script if present
1 parent a78558a commit 9ebf81f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#!/bin/sh
22
echo "Post installation process started"
3-
3+
{% if cookiecutter.console_app %}
44
if [ ! -d "/usr/local/bin" ]; then
55
echo "Creating /usr/local/bin directory"
66
mkdir -p /usr/local/bin
77
fi
88

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

1218
echo "Post installation process finished"

0 commit comments

Comments
 (0)