Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing mod.conf warnings #21

Open
HybridDog opened this issue Mar 11, 2021 · 0 comments
Open

Missing mod.conf warnings #21

HybridDog opened this issue Mar 11, 2021 · 0 comments

Comments

@HybridDog
Copy link
Collaborator

HybridDog commented Mar 11, 2021

With the newest Minetest (since minetest/minetest@9f6167f), I get many Mods not having a mod.conf file with the name is deprecated. warnings.
To fix this, I suggest that someone could replace the depends.txt with a mod.conf in each mod. A title and description for each mod could be copied from the Readme; example for the adjustable blinky plant:

name = moremesecons_adjustable_blinkyplant
title = Adjustable Blinky plant
description = Like a mesecons blinky plant, but... adjustable. Right-click to change the interval.
depends = mesecons,moremesecons_utils
optional_depends = craft_guide

Here's a bash helper function:

mtdependschange() {
	if ! [[ -f depends.txt ]]; then
		echo "No depends.txt!" >&2
		exit 1
	fi
	deps=""
	optdeps=""
	while read line; do
		if [[ "$line" =~ .*\? ]]; then
			optdeps="$optdeps,${line%\?}"
		else
			deps="$deps,$line"
		fi
	done < depends.txt
	[[ $deps = "" ]] || deps="depends = ${deps#,}\n"
	[[ $optdeps = "" ]] || optdeps="optional_depends = ${optdeps#,}\n"
	modname="name = ${PWD##*/}\n"
	echo -en "${modname}title = \ndescription = \n$deps$optdeps" > mod.conf
	trash depends.txt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant