-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildInstallLocal.sh
More file actions
executable file
Β·39 lines (30 loc) Β· 1.19 KB
/
buildInstallLocal.sh
File metadata and controls
executable file
Β·39 lines (30 loc) Β· 1.19 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
36
37
38
39
#!/bin/bash
# DMTools Local Build and Install Script
# This script builds the fat JAR and installs it to the local dmtools directory
set -e
echo "π¨ Building DMTools fat JAR..."
./gradlew :dmtools-core:shadowJar
echo "π¦ Reading version from gradle.properties..."
VERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2 | tr -d ' \t')
if [ -z "$VERSION" ]; then
echo "β Error: Could not read version from gradle.properties"
exit 1
fi
echo "π Found version: $VERSION"
echo "π¦ Checking if fat JAR was created..."
FAT_JAR="build/libs/dmtools-v${VERSION}-all.jar"
if [ ! -f "$FAT_JAR" ]; then
echo "β Error: Fat JAR not found at $FAT_JAR"
exit 1
fi
echo "π Creating ~/.dmtools directory if it doesn't exist..."
mkdir -p ~/.dmtools
echo "π Installing fat JAR to ~/.dmtools/dmtools.jar..."
cp "$FAT_JAR" ~/.dmtools/dmtools.jar
# Verify installation
echo "β
Installation complete!"
echo "π JAR size: $(ls -lh ~/.dmtools/dmtools.jar | awk '{print $5}')"
echo "π Modified: $(ls -l ~/.dmtools/dmtools.jar | awk '{print $6, $7, $8}')"
echo ""
echo "π DMTools has been successfully built and installed locally!"
echo "π‘ You can now run: ./dmtools.sh [command] [args...]"