forked from jaihysc/Factorio-AircraftRealism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkzip.sh
executable file
·28 lines (24 loc) · 1.07 KB
/
mkzip.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
#!/bin/bash
# Zips the contents of the mod to be uploaded with the name of the current folder
# NOTE! Factorio requires mods to have specific naming, thus the current folder
# (whose name is used) must be named appropriately: e.g., AircraftRealism_1.4.1
# Output is "currentFolderName.zip/currentFoldername/<contents>"
cd "$(dirname "$0")" || exit 1
foldername="$(basename "$PWD")"
filename="${foldername}.zip"
cd .. || exit 1 # Include the current directory (contains mod name) as part of zip
zip -r9 - \
"${foldername}/graphics/" \
"${foldername}/locale/" \
"${foldername}/logic/" \
"${foldername}/sound/" \
"${foldername}/support_aircraft/" \
"${foldername}/aircraftMaker.lua" \
"${foldername}/control.lua" \
"${foldername}/data.lua" \
"${foldername}/data-final-fixes.lua" \
"${foldername}/settings.lua" \
"${foldername}/changelog.txt" \
"${foldername}/info.json" \
"${foldername}/thumbnail.png" \
> "${foldername}/${filename}"