Commit 84ff3b88 authored by Ophélie Gagnard's avatar Ophélie Gagnard

installation/:

- Move packages.sh to env.sh, modify the other files accordingly.
- Find git root in a simpler way.
- Add a shebang where appropriate.
parent 4b3ef8fa
#!/bin/bash #!/bin/bash
# At the moment, this is not a standard configure script. It is only used to generate a makefile with the good package names. # At the moment, this is not a standard configure script. It is only used to generate a makefile with the good package names.
source ../installation/packages.sh source ../installation/env.sh
FLB_PATH=/opt/${FLUENTBIT_NAME_AND_VERSION} FLB_PATH=/opt/${FLUENTBIT_NAME_AND_VERSION}
MCA_PATH=/opt/${MCA_NAME_AND_VERSION} MCA_PATH=/opt/${MCA_NAME_AND_VERSION}
......
#!/bin/bash
set -e set -e
# get the root of the git repository (requires git to be installed) # get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m ./$(git rev-parse --show-cdup)` GIT_ROOT=`git rev-parse --show-toplevel`
cd $GIT_ROOT/installation/ cd $GIT_ROOT/installation/
# initialize package name variables # define useful variables
source packages.sh source env.sh
# useful tools # useful tools
apt -y install ${APT_UTILITY_PACKAGES} apt -y install ${APT_UTILITY_PACKAGES}
......
# This file is sourced by various other scripts used to install this project. # This file is sourced by various other scripts used to install this project.
ARCH=amd64 # get the root of the git repository (requires git to be installed)
PACKAGE_EXTENSION=.deb GIT_ROOT=`git rev-parse --show-toplevel`
MCA_VERSION=1-1 PROJECT_DIR=$GIT_ROOT
FLUENTBIT_VERSION=1-1
# TO BE MODIFIED BY USERS:
MCA_PACKAGE_NAME=dep--mca-static MCA_PACKAGE_NAME=dep--mca-static
FLUENTBIT_PACKAGE_NAME=fluent-bit FLUENTBIT_PACKAGE_NAME=fluent-bit
MCA_VERSION=1-1
FLUENTBIT_VERSION=1-1
ARCH=amd64
PACKAGE_EXTENSION=.deb
# used in dracut.module/configure # used mainly in dracut.module/configure
MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION} MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION}
FLUENTBIT_NAME_AND_VERSION=${FLUENTBIT_PACKAGE_NAME}_${FLUENTBIT_VERSION} FLUENTBIT_NAME_AND_VERSION=${FLUENTBIT_PACKAGE_NAME}_${FLUENTBIT_VERSION}
# used in installation/dependencies.sh # used mainly in installation/dependencies.sh and installation/remove-dependencies.sh
APT_UTILITY_PACKAGES="sudo wget tree" APT_UTILITY_PACKAGES="sudo wget tree"
APT_SPECIFIC_PACKAGES="dracut-core dracut dracut-network" APT_SPECIFIC_PACKAGES="dracut-core dracut dracut-network"
...@@ -21,6 +28,15 @@ URL_PATTERN="https://download.opensuse.org/repositories/home:/fg.nxd/Debian_11/" ...@@ -21,6 +28,15 @@ URL_PATTERN="https://download.opensuse.org/repositories/home:/fg.nxd/Debian_11/"
MCA_PACKAGE_URL=${URL_PATTERN}/${ARCH}/${MCA_PACKAGE_FILE} MCA_PACKAGE_URL=${URL_PATTERN}/${ARCH}/${MCA_PACKAGE_FILE}
FLUENTBIT_PACKAGE_URL=${URL_PATTERN}/${ARCH}/${FLUENTBIT_PACKAGE_FILE} FLUENTBIT_PACKAGE_URL=${URL_PATTERN}/${ARCH}/${FLUENTBIT_PACKAGE_FILE}
# DEBUG 100 # used mainly in installation/install.sh and installation/uninstall.sh
#echo MCA_PACKAGE_FILE = ${MCA_PACKAGE_FILE} SOURCE_EFI_DIR=/boot/efi/EFI/
#echo FLUENTBIT_PACKAGE_FILE = ${FLUENTBIT_PACKAGE_FILE} TARGET_EFI_DIR=/EFI/
SOURCE_EFI_DIR=`realpath -m $SOURCE_EFI_DIR`
TARGET_EFI_DIR=`realpath -m $TARGET_EFI_DIR`
SOURCE_IMAGE_DIR=$SOURCE_EFI_DIR/Linux/
TARGET_IMAGE_DIR=$TARGET_EFI_DIR/Linux/
dracut_output_file=dracut-output
#TARGET_DISK=/dev/nvme1n1
#TARGET_EFI_PARTITION=${TARGET_DISK}p1
#TARGET_ROOT_PARTITION=${TARGET_DISK}p2
#!/bin/bash
set -e set -e
# get the root of the git repository (requires git to be installed) # get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m $(git rev-parse --show-cdup)` GIT_ROOT=`git rev-parse --show-toplevel`
cd $GIT_ROOT cd $GIT_ROOT
PROJECT_DIR=`pwd` # define useful variables
SOURCE_EFI_DIR=/boot/efi/EFI/ source installation/env.sh
TARGET_EFI_DIR=/EFI/
SOURCE_EFI_DIR=`realpath -m $SOURCE_EFI_DIR`
TARGET_EFI_DIR=`realpath -m $TARGET_EFI_DIR`
SOURCE_IMAGE_DIR=$SOURCE_EFI_DIR/Linux/
TARGET_IMAGE_DIR=$TARGET_EFI_DIR/Linux/
dracut_output_file=dracut-output
# This script assumes to be run by the root user (with /sbin in the path). # This script assumes to be run by the root user (with /sbin in the path).
......
#!/bin/bash
set -e set -e
# get the root of the git repository (requires git to be installed) # get the root of the git repository (requires git to be installed)
GIT_ROOT=`realpath -m ./$(git rev-parse --show-cdup)` GIT_ROOT=`git rev-parse --show-toplevel`
cd $GIT_ROOT/installation/ cd $GIT_ROOT/installation/
# initialize package name variables # define useful variables
source packages.sh source env.sh
# do not uninstall the useful tools # do not uninstall the useful tools
......
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