-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63ba28e
commit 2765c61
Showing
4 changed files
with
66 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
(set -o igncr) 2>/dev/null && set -o igncr; # This comment is required. | ||
### The above line ensures that the script can be run on Cygwin/Linux even with Windows CRNL. | ||
### Run this script after updating the mod to prepare a zip of it. | ||
|
||
main() { | ||
### Check commands | ||
if ! command -v git &> /dev/null; then | ||
echo "Please install/use git https://git-scm.com/downloads" | ||
fi | ||
local has_errors=false | ||
if ! command -v 7z &> /dev/null; then | ||
echo "Please install 7-Zip https://www.7-zip.org/download.html" | ||
local has_errors=true | ||
fi | ||
if [ $has_errors = true ] ; then | ||
exit 1 | ||
fi | ||
|
||
|
||
### mod_folder is a mod directory with info.json | ||
local init_dir=`pwd` | ||
|
||
echo "Target folder: ${init_dir}" | ||
|
||
|
||
### Prepare zip | ||
### https://www.7-zip.org/download.html | ||
local name="sitelen_pona_lua" | ||
if command -v git &> /dev/null; then | ||
git clean -xdf | ||
fi | ||
7z a -xr'!.*' "${init_dir}/${name}.zip" "${init_dir}" | ||
} | ||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "zip mod", | ||
"type": "shell", | ||
"command": "bash", | ||
"args": [".scripts/zip_mod.sh"], | ||
"group": "build", | ||
"presentation": { | ||
"reveal": "silent", | ||
} | ||
}, | ||
{ | ||
"label": "Luacheck", | ||
"type": "shell", | ||
"command": "luacheck", | ||
"args": ["${file}"], | ||
"group": "test" | ||
}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters