Black Mesa

Black Mesa

Black Mesa: Blue Shift
How to install Black Mesa Blue Shift in the Linux
1 - You will need to create a file names bmhecu_installer.sh in the directory ~/.steam/steam/steamapps/workshop/content/362890/2424633574

2 - Place it in the script below in the file.

#!/bin/bash

# -------------------------------------
# bshift_symlink_installer.sh
# Creates a symbolic link to the "bshift" mod directory
# inside the Black Mesa game folder on Linux
# -------------------------------------

set -euo pipefail
IFS=$'\n\t'

clear
echo "🔗 BM: BShift Linux Symlink Installer"
echo

# Get the mod directory (where this script is located)
MOD_DIR="$(dirname "$(readlink -f "$0")")"
MOD_BSHIFT_DIR="$MOD_DIR/bshift"

# Possible Black Mesa installation locations (Steam Linux)
POSSIBLE_DIRS=(
"$HOME/.steam/steam/steamapps/common/Black Mesa"
"$HOME/.steam/debian-installation/steamapps/common/Black Mesa"
"$HOME/.local/share/Steam/steamapps/common/Black Mesa"
)

# Try to locate the Black Mesa installation
GAME_DIR=""
for dir in "${POSSIBLE_DIRS[@]}"; do
if [[ -d "$dir" ]]; then
GAME_DIR="$dir"
break
fi
done

# If not found, ask the user
if [[ -z "$GAME_DIR" ]]; then
echo "❌ Could not automatically locate the Black Mesa installation directory."
read -rp "Please enter the full path to your Black Mesa installation: " GAME_DIR
fi

LINK_PATH="$GAME_DIR/bshift"

# Remove old link or directory if it exists
if [[ -L "$LINK_PATH" || -d "$LINK_PATH" ]]; then
echo "Removing old 'bshift' link or directory..."
rm -rf "$LINK_PATH"
if [[ -e "$LINK_PATH" ]]; then
echo "❌ Failed to remove the existing 'bshift' link or folder."
echo "Please delete it manually: $LINK_PATH"
exit 1
fi
echo "✅ Old link removed."
fi

# Create a new symbolic link
ln -s "$MOD_BSHIFT_DIR" "$LINK_PATH"

# Verify link creation
if [[ -L "$LINK_PATH" ]]; then
echo "✅ Symlink created successfully:"
echo " $LINK_PATH → $MOD_BSHIFT_DIR"
else
echo "❌ Failed to create the symbolic link."
exit 1
fi

read -rp "Press ENTER to exit..."
exit 0