|
@ -525,29 +525,33 @@ minimize_mod() { |
|
|
fi |
|
|
fi |
|
|
# remove etc to make users downloading mods faster: |
|
|
# remove etc to make users downloading mods faster: |
|
|
if [ -d "$MTMOD_DEST_PATH/etc" ]; then |
|
|
if [ -d "$MTMOD_DEST_PATH/etc" ]; then |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/etc..." |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/etc..." |
|
|
rm -Rf "$MTMOD_DEST_PATH/etc" |
|
|
rm -Rf "$MTMOD_DEST_PATH/etc" |
|
|
fi |
|
|
fi |
|
|
if [ -d "$MTMOD_DEST_PATH/projects" ]; then |
|
|
if [ -d "$MTMOD_DEST_PATH/projects" ]; then |
|
|
rm -Rf "$MTMOD_DEST_PATH/projects" |
|
|
rm -Rf "$MTMOD_DEST_PATH/projects" |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/projects..." |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/projects..." |
|
|
fi |
|
|
fi |
|
|
if [ -d "$MTMOD_DEST_PATH/src" ]; then |
|
|
if [ -d "$MTMOD_DEST_PATH/src" ]; then |
|
|
if [ -z "`ls $MTMOD_DEST_PATH/src/*.lua`" ]; then |
|
|
if [ -z "`ls $MTMOD_DEST_PATH/src/*.lua`" ]; then |
|
|
rm -Rf "$MTMOD_DEST_PATH/src" |
|
|
rm -Rf "$MTMOD_DEST_PATH/src" |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/src since it contains no lua files..." |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing non-game data at $MTMOD_DEST_PATH/src since it contains no lua files..." |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
for EXTRA_NAME in screenshot.png screenshot.jpg screenshot.bmp screenshot.tif screenshot.gif |
|
|
for EXTRA_NAME in screenshot.png screenshot.jpg screenshot.bmp screenshot.tif screenshot.gif |
|
|
do |
|
|
do |
|
|
# if ls ${MTMOD_DEST_PATH}/*.png &>/dev/null |
|
|
# if ls ${MTMOD_DEST_PATH}/*.png &>/dev/null |
|
|
if [ -f "$MTMOD_DEST_PATH/$EXTRA_NAME" ]; then |
|
|
if [ -f "$MTMOD_DEST_PATH/$EXTRA_NAME" ]; then |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing $MTMOD_DEST_PATH/$EXTRA_NAME..." |
|
|
echo " optimizing $MTMOD_DEST_NAME mod: removing $MTMOD_DEST_PATH/$EXTRA_NAME..." |
|
|
rm -f "$MTMOD_DEST_PATH/$EXTRA_NAME" |
|
|
rm -f "$MTMOD_DEST_PATH/$EXTRA_NAME" |
|
|
fi |
|
|
fi |
|
|
done |
|
|
done |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if [ "@$EM_ONLINE" = "@" ]; then |
|
|
|
|
|
EM_ONLINE="true" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
install_git_mod_here(){ |
|
|
install_git_mod_here(){ |
|
|
PREV_DIR="`pwd`" |
|
|
PREV_DIR="`pwd`" |
|
|
THIS_MODS_PATH="`pwd`" |
|
|
THIS_MODS_PATH="`pwd`" |
|
@ -578,12 +582,14 @@ install_git_mod_here(){ |
|
|
else |
|
|
else |
|
|
cd "$THIS_MOD_REPO" || customExit "(install_git_mod_here) 'cd \"$THIS_MOD_REPO\"' failed in '`pwd`'" |
|
|
cd "$THIS_MOD_REPO" || customExit "(install_git_mod_here) 'cd \"$THIS_MOD_REPO\"' failed in '`pwd`'" |
|
|
# echo " * updating '`pwd`' from git..." |
|
|
# echo " * updating '`pwd`' from git..." |
|
|
GIT_OUTPUT=$(git pull) |
|
|
if [ "@$EM_ONLINE" != "@false" ]; then |
|
|
if [ "$GIT_OUTPUT" != "Already up to date." ]; then |
|
|
GIT_OUTPUT=$(git pull) |
|
|
echo " $GIT_OUTPUT" |
|
|
if [ "$GIT_OUTPUT" != "Already up to date." ]; then |
|
|
fi |
|
|
echo " $GIT_OUTPUT" |
|
|
if [ $? -ne 0 ]; then |
|
|
fi |
|
|
echo "WARNING: (install_git_mod_here) 'git pull' failed in '`pwd`'" |
|
|
if [ $? -ne 0 ]; then |
|
|
|
|
|
echo "WARNING: (install_git_mod_here) 'git pull' failed in '`pwd`'" |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|