-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpackage.sh
executable file
·45 lines (32 loc) · 1.2 KB
/
package.sh
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
#!/bin/bash
# Exit on error
set -e
# Run build_os3.sh with CLEAN=1
CLEAN=1 ./build_os3.sh
# Copy AmigaGPT executable to bundle directory
cp -R out/AmigaGPT_OS3 bundle/AmigaGPT/AmigaGPT/AmigaGPT_OS3
# Run build_os4.sh with CLEAN=1
CLEAN=1 ./build_os4.sh
# Copy AmigaGPT_OS4 executable to bundle directory
cp -R out/AmigaGPT_OS4 bundle/AmigaGPT/AmigaGPT/AmigaGPT_OS4
# Run build_morphos.sh with CLEAN=1
CLEAN=1 ./build_morphos.sh
# Copy AmigaGPT_MorphOS executable to bundle directory
cp -R out/AmigaGPT_MorphOS bundle/AmigaGPT/AmigaGPT/AmigaGPT_MorphOS
# Copy catalog files to bundle directory
mkdir -p bundle/AmigaGPT/catalogs
rsync -av --include='*/' --include='*.catalog' --exclude='*' catalogs/ bundle/AmigaGPT/catalogs/
# Change directory to bundle directory
cd bundle
# Delete LHA archive if exists
rm -f ../out/AmigaGPT.lha
# Check if running on macOS and set appropriate LHA options
if [[ "$(uname -s)" == "Darwin" ]]; then
LHA_OPTS="av --ignore-mac-files"
else
LHA_OPTS="av"
fi
# Create LHA archive with verbose output
lha $LHA_OPTS ../out/AmigaGPT.lha AmigaGPT AmigaGPT.info
rm -f AmigaGPT/AmigaGPT/AmigaGPT_OS3 AmigaGPT/AmigaGPT/AmigaGPT_OS4 AmigaGPT/AmigaGPT/AmigaGPT_MorphOS
rm -dr AmigaGPT/catalogs