-
Notifications
You must be signed in to change notification settings - Fork 0
/
game-stencils-package.sh
executable file
·66 lines (66 loc) · 1.73 KB
/
game-stencils-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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#
# ----------------------------------------------------------------------------
# Re-package standard game-stencils from source into compressed (zip) files
# ============================================================================
# Created: 2024-05-27, by [email protected]
# Last modified: 2024-05-27, by [email protected]
# ----------------------------------------------------------------------------
#
# Figure-out where the scripts folder is located ...
#
SCRIPTS_FOLDER="$( dirname -- "$( readlink -f -- "$0"; )"; )";
#
# Innclude the base script dependancies ...
#
source $SCRIPTS_FOLDER/include/include-base.inc;
#
# NO script log file ...
#
SCRIPT_LOG_FILE="";
#
# Display start of stuff ...
#
source $SCRIPTS_FOLDER/include/include-outputbegin.inc;
#
# Determine which folders to use ...
#
SOURCE_FOLDER="$STENCILS_FOLDER/source";
OUTPUT_FOLDER="$STENCILS_FOLDER";
#
# Change to the folder with all then
# different configuration sub-folders
# stored inside it ..
#
cd $SOURCE_FOLDER;
#
# Loop through source folders,
# compressing the content of each
# and putting the output zip file
# in the proper place ...
#
for CONFIGURATION in *; do
#
# Check its really a folder (not a file) ...
#
if [ -d "$CONFIGURATION" ]; then
#
# Build the compression command to use ..
#
COMPRESS_COMMAND="7za a -tzip -mmt=off -snl $OUTPUT_FOLDER/$CONFIGURATION.zip ./*";
#
# Diplay compression command that will be used ...
#
echo "-----------------------";
echo "Input to be compressed: $CONFIGURATION"
echo "Compression command being used:"
echo "$COMPRESS_COMMAND";
cd $SOURCE_FOLDER/$CONFIGURATION;
$COMPRESS_COMMAND;
cd $SOURCE_FOLDER;
echo "";
fi;
done;
#
# ... thats all folks!
#