pass install root as parameter to package scripts

This commit is contained in:
hippoz 2021-01-16 16:49:12 +02:00
parent 2d95b6cdcb
commit 2ac9696aa9
No known key found for this signature in database
GPG key ID: 7C52899193467641

4
aps.sh
View file

@ -70,14 +70,14 @@ add_package_to_database() {
cp -pv "${AL_TEMP_LOCATION}/${AL_PKG_NAME}-payloadfiles" "${AL_INSTALLED_PKG_DATABASE}/${AL_PKG_NAME}/payloadfiles"
fi
else
echo "[*] Target ${AL_PKG_NAME} does not have a package script and will not be added to the installed package database"
echo "[E] Target ${AL_PKG_NAME} does not have a package script and will not be added to the installed package database"
fi
}
run_package_script() {
if [ -x "${AL_PKG_PACKAGE_PATH}/${1}" ]; then
echo ":: Running ${1} script for target ${AL_PKG_NAME}..."
. "${AL_PKG_PACKAGE_PATH}/${1}"
. "${AL_PKG_PACKAGE_PATH}/${1}" ${AL_INSTALL_ROOT}
fi
}