Files
qt5/coin/provisioning/common/linux/mount-vcpkg-cache-drive.sh
Amir Masoud Abdol 10b0282ea2 Provisioning: Mount Vcpkg Cache Drive on Linux
Change-Id: Ib7345f622e05248aa0a61e44a4d079666e56ae7d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-11-05 10:05:47 +01:00

22 lines
596 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
set -e
targetDir="$HOME/vcpkg-cache"
# Specify the path to the credential file
credentialsFile="$HOME/samba_credentials"
sudo mkdir -p "$targetDir"
# Mount the SMB share
# Check if the mount was successful
if sudo mount -t cifs //vcpkg-server.ci.qt.io/vcpkg "$targetDir" -o credentials="$credentialsFile",uid="$(id -u)",gid="$(id -g)"
then
echo "SMB share mounted successfully!"
else
echo "Failed to mount SMB share."
fi