-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild
More file actions
38 lines (28 loc) · 907 Bytes
/
build
File metadata and controls
38 lines (28 loc) · 907 Bytes
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
#!/bin/bash
spinner() {
local pid=$1
local delay=0.1
local spinstr='|/-\'
while ps -p $pid > /dev/null; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
local spinstr=$temp${spinstr%"$temp"}
sleep $delay
printf "\r"
done
printf " \r"
}
echo "Starting build process..."
rm -rf dist
mkdir -p dist/Flowgorithm.app/Contents/MacOS
mkdir -p dist/Flowgorithm.app/Contents/Resources
echo "Downloading Flowgorithm executable... "
curl -L -s -o dist/Flowgorithm-exe-only.zip http://www.flowgorithm.org/download/files/Flowgorithm-exe-only.zip &
spinner $!
echo "Extracting files... "
unzip -q dist/Flowgorithm-exe-only.zip -d dist/Flowgorithm.app/Contents/MacOS &
spinner $!
rm dist/Flowgorithm-exe-only.zip
cp -r contents/ dist/Flowgorithm.app/Contents/
chmod +x dist/Flowgorithm.app/Contents/MacOS/Flowgorithm
echo "Build completed!"