# old version (without -$pkgrel): ${1%%-*}
# new version (without -$pkgrel): ${2%%-*}

PKGNAME="ubl-skel-bash"

# arg 1:  the new package version
pre_install() {
    true
}

# arg 1:  the new package version
post_install() {
    post_upgrade $@
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
    true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    true
    cat << EOF 

==> IMPORTANT!!!
==> To prevent overwriting your existing .bashrc, the file
==> was installed to /usr/share/${PKGNAME}/.bashrc

EOF
    install -Dm0644 /usr/share/${PKGNAME}/.bashrc "/etc/skel/.bashrc"
}

# arg 1:  the old package version
pre_remove() {
    true
}

# arg 1:  the old package version
post_remove() {
    true
}
