post_install() { echo "Generating setenv_AOCC.sh script..." /opt/aocc/install.sh | sed -e "s:/opt/setenv:/opt/aocc/setenv:g" mv /opt/setenv_AOCC.sh /opt/aocc/ if pacman -Q env-modules &> /dev/null; then echo "env-modules seems to be installed:" echo "If configured correctly, you can conveniently use" echo " $ module load aocc" echo "to set up the environment for AMD Optimizing C/C++ Compiler." fi } post_upgrade() { post_install } post_remove() { rm /opt/aocc/setenv_AOCC.sh rmdir /opt/aocc }