aboutsummaryrefslogtreecommitdiff
path: root/scripts/azure-pipelines/osx/initialize-environment.sh
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-05-06 10:31:14 -0700
committerGitHub <noreply@github.com>2020-05-06 10:31:14 -0700
commit66d4f9d411954b4d30042d423651915ae74f67c1 (patch)
tree7275b0f8f0c06dbd3a8a44cdb104bc6fc6cdba1b /scripts/azure-pipelines/osx/initialize-environment.sh
parent4fc008c7f79bcdc672621a794b1be9a080e42b5a (diff)
downloadvcpkg-66d4f9d411954b4d30042d423651915ae74f67c1.tar.gz
vcpkg-66d4f9d411954b4d30042d423651915ae74f67c1.zip
[vcpkg] Add tombstone deletion scripts. (#11189)
Diffstat (limited to 'scripts/azure-pipelines/osx/initialize-environment.sh')
-rwxr-xr-xscripts/azure-pipelines/osx/initialize-environment.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/azure-pipelines/osx/initialize-environment.sh b/scripts/azure-pipelines/osx/initialize-environment.sh
new file mode 100755
index 000000000..5eeba4255
--- /dev/null
+++ b/scripts/azure-pipelines/osx/initialize-environment.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Copyright (c) Microsoft Corporation.
+# SPDX-License-Identifier: MIT
+
+# Sets up the environment for MacOS runs of vcpkg CI
+
+rm -rf installed || true
+mkdir -p ~/Data/installed || true
+ln -s ~/Data/installed
+rm -rf ~/Data/installed/* || true
+
+rm -rf buildtrees || true
+mkdir -p ~/Data/buildtrees || true
+ln -s ~/Data/buildtrees
+rm -rf ~/Data/buildtrees/* || true
+
+rm -rf packages || true
+mkdir -p ~/Data/packages || true
+ln -s ~/Data/packages
+rm -rf ~/Data/packages/* || true
+
+rm archives || rm -rf archives || true
+ln -s ~/Data/archives
+
+rm -rf downloads || true
+mkdir -p ~/Data/downloads || true
+ln -s ~/Data/downloads
+
+if [ -d downloads/ ]; then
+#delete downloaded files that have not been used in 7 days
+find downloads/ -maxdepth 1 -type f ! -atime 7 -exec rm -f {} \;
+fi