#!/bin/bash

SMB_SHARE="//172.31.180.4/TCLI-Data-Repo"
MOUNT_POINT="$HOME/TCLI-Data-Repo"
USER="matthieu.fortin"
PASSWORD="New42d@y"

if [ ! -d "$MOUNT_POINT" ]; then
  mkdir -p "$MOUNT_POINT"
fi

sudo mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o username="$USER",password="$PASSWORD"

if mountpoint -q "$MOUNT_POINT"; then
  echo "Successfully mounted $SMB_SHARE at $MOUNT_POINT"
else
  echo "Failed to mount $SMB_SHARE"
fi
