fpm/templates/pacman/INSTALL.erb

42 lines
900 B
Plaintext
Raw Permalink Normal View History

2015-05-03 08:28:49 +08:00
<%# In each function, a `:` is the first command. -%>
<%# This makes sure that at least one command is in the function -%>
<%# This avoids a lot of potential errors, including the case that -%>
<%# the script is non-empty, but just whitespace and/or comments -%>
<%# see issue #875 for more details -%>
<% if script?(:before_install) -%>
pre_install() {
:
<%= script(:before_install) %>
}
<% end -%>
<% if script?(:after_install) -%>
post_install() {
:
<%= script(:after_install) %>
}
2015-05-09 09:59:38 +08:00
<% end -%>
<% if script?(:before_upgrade) -%>
2015-05-03 08:28:49 +08:00
pre_upgrade() {
:
<%= script(:before_upgrade) %>
}
<% end -%>
<% if script?(:after_upgrade) -%>
post_upgrade() {
:
<%= script(:after_upgrade) %>
}
<% end -%>
<% if script?(:before_remove) -%>
pre_remove() {
:
<%= script(:before_remove) %>
}
<% end -%>
<% if script?(:after_remove) -%>
2015-05-09 09:59:38 +08:00
post_remove() {
2015-05-03 08:28:49 +08:00
:
2015-05-09 09:59:38 +08:00
<%= script(:after_remove) %>
2015-05-03 08:28:49 +08:00
}
<% end -%>