Commit 4b3ef8fa authored by Ophélie Gagnard's avatar Ophélie Gagnard

installation/:

- Support easy removing of the packages dependencies.
- Improve detection of the repository root.
parent 0dc1b24f
set -e
# get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m ./$(git rev-parse --show-cdup)`
cd $GIT_ROOT/installation/
# initialize package name variables
source packages.sh
# basic and dirty detection of the working directory
# it assumes the script is called either from initramfs-with-mca/installation (where fluent-bit_1-1_amd64.deb is located)
# or initramfs-with-mca/ in which case it changes to installation/ so that the package is available
if [ ! -e "$FLUENTBIT_PACKAGE" ]; then
cd installation/
fi
# useful tools
apt -y install sudo git wget tree
apt -y install ${APT_UTILITY_PACKAGES}
git config --global user.email "francois.gagnard@nexedi.com"
git config --global user.name "Francois Gagnard"
# building initramfs
apt -y install dracut-core dracut dracut-network
wget https://download.opensuse.org/repositories/home:/fg.nxd/Debian_11/$ARCH/"$MCA_PACKAGE"
apt -y install ./"$MCA_PACKAGE"
apt -y install ./"$FLUENTBIT_PACKAGE"
apt -y install ${APT_SPECIFIC_PACKAGES}
wget ${MCA_PACKAGE_URL}
#wget ${FLUENTBIT_PACKAGE_URL} # does not work at the moment
apt -y install ./"$MCA_PACKAGE_FILE"
apt -y install ./"$FLUENTBIT_PACKAGE_FILE"
set -e
# basic and dirty detection of the working directory
# it assumes the script is called either from initramfs-with-mca (which dracut.module/ is a subdirectory of)
# or initramfs-with-mca/installation in which case it goes to the parent directory so that dracut.module/ is available
if [ ! -d dracut.module ]; then
cd ..
fi
# get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m $(git rev-parse --show-cdup)`
cd $GIT_ROOT
PROJECT_DIR=`pwd`
SOURCE_EFI_DIR=/boot/efi/EFI/
......
set -e
# get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m ./$(git rev-parse --show-cdup)`
cd $GIT_ROOT/installation/
# initialize package name variables
source packages.sh
# do not uninstall the useful tools
# building initramfs
apt-get -y remove ${MCA_PACKAGE_NAME} || true
apt-get -y remove ${FLUENTBIT_PACKAGE_NAME} || true
rm -f ${MCA_PACKAGE_FILE} ${MCA_PACKAGE_FILE}.*
#rm ${FLUENTBIT_PACKAGE_FILE} ${FLUENTBIT_PACKAGE_FILE}.* # do not delete because it is shiped with the repository at the moment
apt -y remove ${APT_SPECIFIC_PACKAGES} || true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment