Files
elab-manage/bin/elab-manage-install

21 lines
808 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Get the directory where the script resides
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# TODO: ${##*/}
# Define the destination directory where the elab-update symbolic link will be created
DEST_DIR="/usr/local/bin/"
# Check if the elab-update script exists in the source directory
if [ ! -f "$SOURCE_DIR/elab-update" ]; then
echo "Error: elab-update script not found in the source directory."
exit 1
fi
# Create a symbolic link to the elab-update script in the destination directory
echo "Creating symbolic link to elab-update script in $DEST_DIR..."
sudo ln -sf "$SOURCE_DIR/elab-update" "$DEST_DIR" || { echo "Error: Unable to create symbolic link."; exit 1; }
echo "elab-update command has been successfully installed as a symbolic link."