-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.sh
More file actions
executable file
·54 lines (44 loc) · 894 Bytes
/
submit.sh
File metadata and controls
executable file
·54 lines (44 loc) · 894 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Rebuild run.n (CLI bytecode)
echo "Building run.n..."
haxe -main Run -neko run.n
if [ $? -ne 0 ]; then
echo "Error building run.n"
exit 1
fi
# Target zip file
ZIP_NAME="shade.zip"
# Delete existing zip if it exists
rm -f "$ZIP_NAME"
# Create a temporary exclude file
EXCLUDE_FILE=".zipexclude"
# Write excluded patterns to the exclude file
cat > "$EXCLUDE_FILE" << EOF
.git/*
.git/**/*
.vscode/*
.vscode/**/*
.haxelib/*
.haxelib/**/*
.DS_Store
*.log
test/out/*
test/out/**/*
submit.sh
$ZIP_NAME
$EXCLUDE_FILE
EOF
# Create zip command and execute
echo "Creating $ZIP_NAME..."
zip -r "$ZIP_NAME" . -x@"$EXCLUDE_FILE"
# Check if zip was successful
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "Successfully created $ZIP_NAME"
else
echo "Error creating zip file"
fi
# Clean up the temporary exclude file
rm "$EXCLUDE_FILE"
haxelib submit shade.zip
exit $STATUS