-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·58 lines (49 loc) · 1.42 KB
/
deploy.sh
File metadata and controls
executable file
·58 lines (49 loc) · 1.42 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Build and deploy AffinityPluginLoader to the Affinity install directory.
# Usage:
# ./deploy.sh # Build in Docker and deploy
# ./deploy.sh --skip-build # Deploy existing build
# ./deploy.sh --set-affinity-path /path/to/affinity # Save install path
set -e
ROOTDIR=$(dirname "$(readlink -f "$0")")
PATH_FILE="$ROOTDIR/.AFFINITY_PATH"
SKIP_BUILD=false
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--set-affinity-path)
echo "$2" > "$PATH_FILE"
echo "Affinity path saved: $2"
exit 0
;;
--skip-build)
SKIP_BUILD=true
shift
;;
*)
echo "Usage: $0 [--skip-build] [--set-affinity-path <path>]"
exit 1
;;
esac
done
if [ ! -f "$PATH_FILE" ]; then
echo "Error: Affinity install path not set."
echo "Run: $0 --set-affinity-path /path/to/affinity"
exit 1
fi
AFFINITY_PATH=$(cat "$PATH_FILE")
if [ ! -d "$AFFINITY_PATH" ]; then
echo "Error: Affinity path does not exist: $AFFINITY_PATH"
exit 1
fi
if [ "$SKIP_BUILD" = false ]; then
bash "$ROOTDIR/package-release.sh" --docker
fi
ARCHIVE="$ROOTDIR/releases/affinitypluginloader-plus-winefix.tar.xz"
if [ ! -f "$ARCHIVE" ]; then
echo "Error: Archive not found: $ARCHIVE"
exit 1
fi
echo "Deploying to: $AFFINITY_PATH"
tar -xJf "$ARCHIVE" -C "$AFFINITY_PATH"
echo "Done."