refactor(serif): fixed typos and updated names to reflect 4DSSE->SERiF

This commit is contained in:
2025-06-12 09:04:03 -04:00
parent 620f3d495c
commit 2eca802d01
9 changed files with 302 additions and 308 deletions

64
mk
View File

@@ -26,7 +26,7 @@ Options:
You can use these flags in any order. Flags not passed will get default values.
Examples:
For an end user who wants a seemless experience 4DSSE:
For an end user who wants a seamless experience 4DSSE:
./mk --user
For developers who want to modify the source:
./mk
@@ -83,7 +83,7 @@ if [[ ! -d "$LOGDIR" ]]; then
echo -e "${BLUE}[Info] Creating log directory...${NC}"
mkdir "$LOGDIR"
else
echo -e "${MAGENTA}[Succsess] Log directory already exists. Skipping...${NC}"
echo -e "${MAGENTA}[Success] Log directory already exists. Skipping...${NC}"
fi
LOGFILE="${LOGDIR}/4DSSE-install-log.txt"
@@ -112,7 +112,7 @@ if ! command -v clang &> /dev/null && ! command -v gcc &> /dev/null; then
log "${YELLOW}[Info] Please install Clang or GCC and try again.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] Clang or GCC is installed. Continuing...${NC}"
log "${MAGENTA}[Success] Clang or GCC is installed. Continuing...${NC}"
fi
# --- Check if MESON is installed ---
@@ -137,7 +137,7 @@ if ! command -v meson &> /dev/null; then
log "${YELLOW}[Info] Please install pip and try again.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] pip is installed. Continuing...${NC}"
log "${MAGENTA}[Success] pip is installed. Continuing...${NC}"
fi
# check if python3 is installed
@@ -147,7 +147,7 @@ if ! command -v meson &> /dev/null; then
log "${YELLOW}[INFO] If you have python3 installed, please add it to your PATH.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] python3 is installed. Continuing...${NC}"
log "${MAGENTA}[Success] python3 is installed. Continuing...${NC}"
fi
# Check if the venv ~/.4DSSE_env exists
@@ -155,9 +155,9 @@ if ! command -v meson &> /dev/null; then
log "${BLUE}[Info] Creating virtual environment...${NC}"
python3 -m venv "$HOME/.4DSSE_env"
source "$HOME/.4DSSE_env/bin/activate"
log "${GREEN}[Succsess] Virtual environment created.${NC}"
log "${GREEN}[Success] Virtual environment created.${NC}"
else
log "${MAGENTA}[Succsess] Virtual environment already exists. Skipping...${NC}"
log "${MAGENTA}[Success] Virtual environment already exists. Skipping...${NC}"
fi
# install meson
@@ -170,14 +170,14 @@ if ! command -v meson &> /dev/null; then
log "${YELLOW}[Info] Please manually install Meson and try again.${NC}"
exit 1
else
log "${GREEN}[Succsess] Meson installed.${NC}"
log "${GREEN}[Success] Meson installed.${NC}"
fi
else
log "${YELLOW}[Info] Please install Meson and try again.${NC}"
exit 1
fi
else
log "${MAGENTA}[Succsess] Meson is installed. Continuing...${NC}"
log "${MAGENTA}[Success] Meson is installed. Continuing...${NC}"
fi
# --- Check if NINJA is installed ---
@@ -203,7 +203,7 @@ if ! command -v ninja &> /dev/null; then
log "${YELLOW}[Info] Please install pip and try again.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] pip is installed. Continuing...${NC}"
log "${MAGENTA}[Success] pip is installed. Continuing...${NC}"
fi
# check if python3 is installed
@@ -213,7 +213,7 @@ if ! command -v ninja &> /dev/null; then
log "${YELLOW}[INFO] If you have python3 installed, please add it to your PATH.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] python3 is installed. Continuing...${NC}"
log "${MAGENTA}[Success] python3 is installed. Continuing...${NC}"
fi
# Check if the venv ~/.4DSSE_env exists
@@ -221,9 +221,9 @@ if ! command -v ninja &> /dev/null; then
log "${BLUE}[Info] Creating virtual environment...${NC}"
python3 -m venv "$HOME/.4DSSE_env"
source "$HOME/.4DSSE_env/bin/activate"
log "${GREEN}[Succsess] Virtual environment created.${NC}"
log "${GREEN}[Success] Virtual environment created.${NC}"
else
log "${MAGENTA}[Succsess] Virtual environment already exists. Skipping...${NC}"
log "${MAGENTA}[Success] Virtual environment already exists. Skipping...${NC}"
fi
# install ninja
@@ -236,14 +236,14 @@ if ! command -v ninja &> /dev/null; then
log "${YELLOW}[Info] Please manually install Ninja and try again.${NC}"
exit 1
else
log "${GREEN}[Succsess] Ninja installed.${NC}"
log "${GREEN}[Success] Ninja installed.${NC}"
fi
else
log "${YELLOW}[Info] Please install Ninja and try again.${NC}"
exit 1
fi
else
log "${MAGENTA}[Succsess] Ninja is installed. Continuing...${NC}"
log "${MAGENTA}[Success] Ninja is installed. Continuing...${NC}"
fi
# --- Check if CMake is installed ---
@@ -269,7 +269,7 @@ if ! command -v cmake &> /dev/null; then
log "${YELLOW}[Info] Please install pip and try again.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] pip is installed. Continuing...${NC}"
log "${MAGENTA}[Success] pip is installed. Continuing...${NC}"
fi
# check if python3 is installed
@@ -279,7 +279,7 @@ if ! command -v cmake &> /dev/null; then
log "${YELLOW}[INFO] If you have python3 installed, please add it to your PATH.${NC}"
exit 1
else
log "${MAGENTA}[Succsess] python3 is installed. Continuing...${NC}"
log "${MAGENTA}[Success] python3 is installed. Continuing...${NC}"
fi
# Check if the venv ~/.4DSSE_env exists
@@ -287,9 +287,9 @@ if ! command -v cmake &> /dev/null; then
log "${BLUE}[Info] Creating virtual environment...${NC}"
python3 -m venv "$HOME/.4DSSE_env"
source "$HOME/.4DSSE_env/bin/activate"
log "${GREEN}[Succsess] Virtual environment created.${NC}"
log "${GREEN}[Success] Virtual environment created.${NC}"
else
log "${MAGENTA}[Succsess] Virtual environment already exists. Skipping...${NC}"
log "${MAGENTA}[Success] Virtual environment already exists. Skipping...${NC}"
fi
# install cmake
@@ -302,11 +302,11 @@ if ! command -v cmake &> /dev/null; then
log "${YELLOW}[Info] Please manually install CMake and try again.${NC}"
exit 1
else
log "${GREEN}[Succsess] CMake installed.${NC}"
log "${GREEN}[Success] CMake installed.${NC}"
fi
fi
else
log "${MAGENTA}[Succsess] CMake is installed. Continuing...${NC}"
log "${MAGENTA}[Success] CMake is installed. Continuing...${NC}"
fi
# --- Build 4DSSE ---
@@ -327,7 +327,7 @@ fi
log "${BLUE}[Info] Checking Boost status...${NC}"
# if the following script exists with anything other than a 0 status the script will exit
if [[ -f ./build-config/boost/.boost_installed ]]; then
log "${MAGENTA}[Succsess] Boost already installed. Skipping...${NC}"
log "${MAGENTA}[Success] Boost already installed. Skipping...${NC}"
else
log "${BLUE}[Info] Installing Boost...${NC}"
if ! ./build-config/boost/install.sh; then
@@ -335,7 +335,7 @@ else
exit 1
else
touch ./build-config/boost/.boost_installed
log "${GREEN}[Succsess] Boost check passed.${NC}"
log "${GREEN}[Success] Boost check passed.${NC}"
fi
fi
@@ -343,7 +343,7 @@ fi
log "${BLUE}[Info] Checking MPI status...${NC}"
# if the following script exists with anything other than a 0 status the script will exit
if [[ -f ./build-config/mpi/.mpi_installed ]]; then
log "${MAGENTA}[Succsess] MPI already installed. Skipping...${NC}"
log "${MAGENTA}[Success] MPI already installed. Skipping...${NC}"
else
log "${BLUE}[Info] Installing MPI...${NC}"
if ! ./build-config/mpi/install.sh; then
@@ -351,7 +351,7 @@ else
exit 1
else
touch ./build-config/mpi/.mpi_installed
log "${GREEN}[Succsess] MPI check passed.${NC}"
log "${GREEN}[Success] MPI check passed.${NC}"
fi
fi
@@ -369,7 +369,7 @@ if [[ -f $buildDir/.last_build_flags ]]; then
lastUserFlag=$(grep -Eo 'userFlag=[0-9]+' $buildDir/.last_build_flags | cut -d'=' -f2)
lastTestsFlag=$(grep -Eo 'testsFlag=[0-9]+' $buildDir/.last_build_flags | cut -d'=' -f2)
if [[ $lastUserFlag -eq $userFlag && $lastTestsFlag -eq $testsFlag ]]; then
log "${MAGENTA}[Succsess] Last build flags match current build flags. Skipping configuration...${NC}"
log "${MAGENTA}[Success] Last build flags match current build flags. Skipping configuration...${NC}"
doReconfigure=0
else
log "${YELLOW}[Info] Last build flags do not match current build flags. Reconfiguring...${NC}"
@@ -384,7 +384,7 @@ fi
if [[ $doReconfigure -eq 1 ]]; then
log "${BLUE}[Info] Configuring build directory...${NC}"
if [ -f "$buildDir/build.ninja" ]; then
log "${MAGENTA}[Succsess] Build directory already configured. Skipping...${NC}"
log "${MAGENTA}[Success] Build directory already configured. Skipping...${NC}"
else
if [[ $userFlag -eq 1 ]]; then
meson setup "$buildDir" -Duser_mode=true --buildtype=release
@@ -395,7 +395,7 @@ if [[ $doReconfigure -eq 1 ]]; then
meson setup "$buildDir" --buildtype=debug -Dbuild_tests=false
fi
fi
log "${GREEN}[Succsess] Build directory configured successfully.${NC}"
log "${GREEN}[Success] Build directory configured successfully.${NC}"
fi
log "${BLUE}[Info] Caching last build flags...${NC}"
@@ -411,7 +411,7 @@ if [[ $doReconfigure -eq 1 ]]; then
echo "testsFlag=0" >> $buildDir/.last_build_flags
fi
log "${GREEN}[Succsess] Last build flags cached.${NC}"
log "${GREEN}[Success] Last build flags cached.${NC}"
fi
log "${BLUE}[Info] Building 4DSSE...${NC}"
@@ -429,10 +429,10 @@ if [[ $runTestsFlag -eq 1 ]]; then
fi
if [[ $userFlag -eq 1 ]]; then
log "${GREEN}[Succsess] 4DSSE built and installed successfully.${NC}"
log "${GREEN}[Success] 4DSSE built and installed successfully.${NC}"
else
log "${GREEN}[Succsess] 4DSSE built successfully.${NC}"
log "${GREEN}[Success] 4DSSE built successfully.${NC}"
fi
log "${GREEN}[Succsess] 4DSSE mk script complete.${NC}"
log "${GREEN}[Success] 4DSSE mk script complete.${NC}"