-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from minetest-whynot/buildscripts_compat
fix check-updates.sh and build-mods.sh using new lib-build-whynot.sh
- Loading branch information
Showing
4 changed files
with
110 additions
and
125 deletions.
There are no files selected for viewing
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,114 +1,42 @@ | ||
#!/bin/bash | ||
|
||
PROJ="$(realpath $(dirname $0)/..)" # Absolute path | ||
SRC="$PROJ"/builder/mods_src/ | ||
DST="$PROJ"/mods/ # Subgame mods | ||
LOG="$PROJ"/mod_sources.txt | ||
GIT="git --no-pager" | ||
GITPARAM="--color=always" | ||
RSYNC="rsync -a --info=NAME --delete --exclude=.git --exclude=.gitignore" | ||
|
||
export LC_ALL="C" | ||
|
||
! [ -e "$DST" ] && mkdir "$DST" | ||
####################### | ||
### Debugging options | ||
####################### | ||
#export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' # for debugging, uncomment this line and use `bash -cx` below | ||
|
||
###################### | ||
### Script constants | ||
###################### | ||
MODDIR="mods_src" | ||
export PROJ="$(realpath $(dirname $0)/..)" # Absolute path | ||
export SRC="$PROJ"/builder/$MODDIR | ||
export DST="$PROJ"/mods | ||
export LOG="$PROJ"/mod_sources.txt | ||
|
||
[[ $VERBOSITY == '--quiet' ]] && QUIETONLY=$VERBOSITY || QUIETONLY='' | ||
[[ $VERBOSITY == '--verbose' ]] && VERBOSEONLY=$VERBOSITY || VERBOSEONLY='' | ||
export QUIETONLY | ||
export VERBOSEONLY | ||
|
||
##################### | ||
### Start of script | ||
##################### | ||
|
||
source "$PROJ"/builder/lib-build-whynot.sh | ||
cd "$SRC" # for proper resolving the '*' | ||
|
||
# Remove old log | ||
rm "$LOG" 2>/dev/null | ||
|
||
## Sync minetest_game | ||
# exclude env_sounds => Tenplus1/ambience is used | ||
# exclude farming =>Tenplus1/farming is used | ||
# exclude mtg_craftguide => sfcraftguide is used | ||
# exclude player_api => bell07/player_api_modpack is used | ||
|
||
mod_install minetest_game --exclude=farming --exclude=env_sounds --exclude=mtg_craftguide minetest_game/mods/* | ||
|
||
mod_install libs | ||
|
||
mod_install player --exclude=3d_armor --exclude=smart_sfinv_modpack | ||
mod_install player --exclude=3d_armor_ip --exclude=3d_armor_ui player/3d_armor/* | ||
mod_install player player/smart_sfinv_modpack/* | ||
|
||
mod_install ambience | ||
|
||
mod_install flora_ores | ||
mod_install mapgen | ||
|
||
mod_install tools --exclude=flight --exclude=maidroid | ||
|
||
mod_install tools flight/flyingcarpet | ||
mod_install tools maidroid/maidroid* | ||
|
||
mod_install decor --exclude=homedecor_modpack --exclude=home_workshop_modpack --exclude=mydoors | ||
|
||
mod_install decor decor/homedecor_modpack/building_blocks #grate and marble in recipes | ||
# no computers - I use laptop mod | ||
mod_install decor decor/homedecor_modpack/fake_fire | ||
# no inbox, itemframes | ||
mod_install decor decor/homedecor_modpack/lavalamp | ||
## the homedecor blob was in whynot, therefore applied all at the first | ||
## Next step is to check each mod for whynot rules | ||
# no 3d_extras | ||
mod_install decor decor/homedecor_modpack/homedecor_bathroom | ||
mod_install decor decor/homedecor_modpack/homedecor_bedroom | ||
mod_install decor decor/homedecor_modpack/homedecor_books | ||
mod_install decor decor/homedecor_modpack/homedecor_climate_control | ||
mod_install decor decor/homedecor_modpack/homedecor_clocks | ||
mod_install decor decor/homedecor_modpack/homedecor_cobweb | ||
mod_install decor decor/homedecor_modpack/homedecor_common | ||
mod_install decor decor/homedecor_modpack/homedecor_doors_and_gates | ||
mod_install decor decor/homedecor_modpack/homedecor_electrical | ||
mod_install decor decor/homedecor_modpack/homedecor_electronics | ||
mod_install decor decor/homedecor_modpack/homedecor_exterior | ||
mod_install decor decor/homedecor_modpack/homedecor_fences | ||
mod_install decor decor/homedecor_modpack/homedecor_foyer | ||
mod_install decor decor/homedecor_modpack/homedecor_furniture | ||
mod_install decor decor/homedecor_modpack/homedecor_furniture_medieval | ||
mod_install decor decor/homedecor_modpack/homedecor_gastronomy | ||
mod_install decor decor/homedecor_modpack/homedecor_kitchen | ||
mod_install decor decor/homedecor_modpack/homedecor_laundry | ||
mod_install decor decor/homedecor_modpack/homedecor_lighting | ||
mod_install decor decor/homedecor_modpack/homedecor_misc | ||
mod_install decor decor/homedecor_modpack/homedecor_office | ||
mod_install decor decor/homedecor_modpack/homedecor_pictures_and_paintings | ||
mod_install decor decor/homedecor_modpack/homedecor_plasmascreen | ||
mod_install decor decor/homedecor_modpack/homedecor_roofing | ||
mod_install decor decor/homedecor_modpack/homedecor_seating | ||
mod_install decor decor/homedecor_modpack/homedecor_tables | ||
mod_install decor decor/homedecor_modpack/homedecor_trash_cans | ||
mod_install decor decor/homedecor_modpack/homedecor_wardrobe | ||
mod_install decor decor/homedecor_modpack/homedecor_windows_and_treatments | ||
|
||
mod_install decor decor/home_workshop_modpack/home_vending_machines | ||
mod_install decor decor/home_workshop_modpack/home_workshop_misc | ||
|
||
mod_install decor decor/mydoors/my_castle_doors | ||
mod_install decor decor/mydoors/my_cottage_doors | ||
mod_install decor decor/mydoors/my_default_doors | ||
mod_install decor decor/mydoors/my_door_wood | ||
mod_install decor decor/mydoors/my_fancy_doors | ||
mod_install decor decor/mydoors/my_future_doors | ||
mod_install decor decor/mydoors/my_hidden_doors | ||
mod_install decor decor/mydoors/my_misc_doors | ||
mod_install decor decor/mydoors/my_old_doors | ||
mod_install decor decor/mydoors/my_old_doors | ||
mkdir -p "$DST" | ||
cd "$SRC" | ||
|
||
mod_install food --exclude=food_modpack | ||
# Overwrite old log | ||
>"$LOG" | ||
|
||
mod_install food food/food_modpack/food food/food_modpack/food_basic | ||
echo "Process submodules..." | ||
git submodule status | xargs -P 1 -n 3 bash -c 'source "$PROJ"/builder/lib-config-whynot.sh; process_rebuild_mods "$@"' _ | ||
|
||
mod_install mesecons --exclude=mesecons_lucacontroller \ | ||
--exclude=mesecons_commandblock \ | ||
--exclude=mesecons_detector \ | ||
--exclude=mesecons_fpga \ | ||
--exclude=mesecons_gates \ | ||
--exclude=mesecons_hydroturbine \ | ||
--exclude=mesecons_luacontroller \ | ||
--exclude=mesecons_microcontroller \ | ||
--exclude=mesecons_stickyblocks \ | ||
mesecons/mesecons/* | ||
# Update built-in mods (not submodules) | ||
$RSYNC $SRC/libs/whynot_compat $DST/libs/ | ||
git diff --quiet -- $DST/libs/whynot_compat || git commit $VERBOSITY -m "Update whynot_compat" $DST/libs/whynot_compat | ||
|
||
mod_install mobs_redo mobs_redo/* | ||
# Finalize mods update by commiting mod_sources.txt | ||
git diff --quiet -- $LOG || git commit $VERBOSITY -m "Update mod_sources.txt" $LOG |
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,23 +1,19 @@ | ||
#!/bin/bash | ||
|
||
PROJ="$(realpath $(dirname $0)/..)" # Subgame dir (..) | ||
###################### | ||
### Script constants | ||
###################### | ||
MODDIR="mods_src" | ||
export PROJ="$(realpath $(dirname $0)/..)" # Absolute path | ||
export SRC="$PROJ"/builder/$MODDIR | ||
|
||
# Repositories points to non-default branch | ||
declare -A BRANCHES=( | ||
[minetest_game]=origin/stable-5 # Stay on stable version | ||
[flora_ores/farming]=0b06c7cd450c5ec9a76b3c22a9c57f06e4f8a7c2 # See https://github.com/minetest-whynot/whynot-game/issues/105 | ||
) | ||
##################### | ||
### Start of script | ||
##################### | ||
|
||
source "$PROJ"/builder/lib-build-whynot.sh | ||
|
||
fgrep path "$PROJ"/.gitmodules | while read _ _ p; do | ||
ls -1 "$PROJ"/.git/modules/"$p"/refs/remotes/*/HEAD | sed 's:.*git/modules/builder/mods_src/::;s:/refs/remotes/: :g' | while read mod branch; do | ||
if [ -n "${BRANCHES[$mod]}" ]; then | ||
branch="${BRANCHES[$mod]}" | ||
fi | ||
cd "$SRC" | ||
|
||
echo '**************' "$mod" - "$branch" '***********************' | ||
cd "$PROJ"/builder/mods_src/"$mod" | ||
git fetch | ||
git --no-pager log HEAD.."$branch" | ||
done | ||
done | ||
echo "Check submodules for updates..." | ||
git submodule status | xargs -P 1 -n 3 bash -c 'source "$PROJ"/builder/lib-config-whynot.sh; check_update_mods "$@"' _ |
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
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