#!/bin/bash

# Perform post installation tasks here

{% if link %}
# Create links if needed
{% for source, target in link %}
ln -s "{{ source }}" "{{ target }}"
{% endfor %}
{% endif %}

{% if chmod %}
# Run chmod if needed
{% for mode, file in chmod %}
chmod {{ mode }} "{{ file }}"
{% endfor %}
{% endif %}

{% if post_install %}
# Run the user's post-install script
./custom_postinstall
{% endif %}
