diff --git a/install_mvt.sh b/install_mvt.sh index 16b2ccc..452afd0 100755 --- a/install_mvt.sh +++ b/install_mvt.sh @@ -1,12 +1,20 @@ #!/bin/sh -swift build -c release --arch arm64 --arch x86_64 --product mvt >/dev/null +echo "Building the 'mvt' command line tool..." + +swift build --quiet -c release --arch arm64 --arch x86_64 --product mvt 2>&1 >/dev/null if [[ $? -ne 0 ]] then echo "Failed to build 'mvt'" exit 1 fi +if [[ ! -d "/usr/local/bin" ]] +then + echo "/usr/local/bin doesn't exist, trying to create it (with sudo)" + sudo mkdir -p /usr/local/bin || exit 1 +fi + cp .build/apple/Products/Release/mvt /usr/local/bin/ if [[ $? -ne 0 ]] then