About News Download Docs Bugs Contact

Spell/Files/PRE_RESURRECT

Information

Tools

Resources

PRE_RESURRECT

This file is used for any pre-installation commands when a spell is installed with resurrect.

PRE_RESURRECT example of "ghc" spell:

# We need to backup package.conf and package.conf.old before resurrection

message "${MESSAGE_COLOR}Backuping package.conf and package.conf.old...${DEFAULT_COLOR}"
GHC_VERSION=$(ghc --version | tr -d ' ,[:alpha:]')
GHC_DIR=${INSTALL_ROOT}/usr/lib/ghc-${GHC_VERSION}
cp -v ${GHC_DIR}/package.conf ${GHC_DIR}/package.conf.bak
cp -v ${GHC_DIR}/package.conf.old ${GHC_DIR}/package.conf.old.bak