-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmount-tmpfs.sh
More file actions
executable file
·35 lines (32 loc) · 1.38 KB
/
mount-tmpfs.sh
File metadata and controls
executable file
·35 lines (32 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
MAVEN_REPO_CACHE_PATH="$DIR/.run/maven-repository-path.cache"
if [ -f "$MAVEN_REPO_CACHE_PATH" ]; then
MAVEN_REPO_DIR=$(cat "$MAVEN_REPO_CACHE_PATH")
else
MAVEN_REPO_DIR="$(./mvnw help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)/online/sharedtype"
printf '%s' "$MAVEN_REPO_DIR" > "$MAVEN_REPO_CACHE_PATH"
fi
function mountTmpfs() {
mkdir -p "$1"
sudo mount -t tmpfs -o size="$2" -o noatime tmpfs "$1"
echo "tmpfs mounted at $1 of size $2"
}
mountTmpfs "$DIR/target" 8M
mountTmpfs "$DIR/annotation/target" 32M
mountTmpfs "$DIR/processor/target" 64M
mountTmpfs "$DIR/it/java17/target" 64M
mountTmpfs "$DIR/it/java8/target" 64M
mountTmpfs "$DIR/e2e/target" 64M
mountTmpfs "$DIR/build-tool-plugins/exec/target" 32M
mountTmpfs "$DIR/build-tool-plugins/maven-plugin/target" 32M
mountTmpfs "$DIR/build-tool-plugins/maven-plugin/it/target" 16M
mountTmpfs "$DIR/build-tool-plugins/gradle-plugin/.gradle" 32M
mountTmpfs "$DIR/build-tool-plugins/gradle-plugin/build" 32M
mountTmpfs "$DIR/build-tool-plugins/gradle-plugin/target" 32M
mountTmpfs "$DIR/build-tool-plugins/gradle-plugin/it/.gradle" 16M
mountTmpfs "$DIR/build-tool-plugins/gradle-plugin/it/build" 16M
mountTmpfs "$MAVEN_REPO_DIR" 64M
mountTmpfs "$DIR/client-test/rust/target" 512M
mountTmpfs "$DIR/client-test/typescript/dist" 32M