It works kind of like apt-get in certain Linux distros. Though, it does not have as many commands as apt-get.
For users:
Spoiler
Downloads:2.0: pastebin get PcPcLfur mad-dl
2.1: pastebin get BwgBsRpx mad-dl
Or get the latest version of Mad-DL:
mad-dl install mad_dl
rm mad_dl
How to use it:
When you have installed the program, just run the help command:
mad-dl help
For repository hosters:
Spoiler
This is a bit more advanced. A repository basically consists of one file: ".mad_dl". This file contains a list of all of the packages located in this repository.This is an example of a Mad-DL repo file:
# MAD-DL REPOSITORY DESCRIPTION FILE
# Lists all packages and their respective aliases
START INDEX
# <package name> <path to pkg file>
# Example:
test pkgs/test.pkg
END INDEX
As you can see, this file links the package "test" to the .pkg file "test.pkg", which is located in the directory "pkgs". This file looks like this:
# PACKAGE FILE FOR PACKAGE test
# Lists all of the files that need to be downloaded, and where they should be downloaded to
# NOTE: "__PKG__" will always get interpreted, and automatically replaced with the name of the package
# NOTE: You CANNOT list a file in a directory, which is in a directory that doesn't exist.
LOCATION pkg_test
START CONTENT
# <path to file on server> <path to save destination on client machine>
# OR
# <command> <parameters>
# Example:
main.lua __PKG__/main.lua
conf.lua __PKG__/conf.lua
CMD_MAKE_DIR __PKG__/entities
entities/sheep.lua __PKG__/entities/sheep.lua # The directory "entities" will be created on client machine
END CONTENT
START INFO
This is just a package meant for testing, if Mad-DL works.
This will (hopefully) show, if you type this: mad-dl info test
END INFO
END PKG
Here, "__PKG__" gets translated to the installation path of the package on the clients computer, so it's a good idea to put it there.
You can also execute commands, though for now you can only create directories. This is done with the "CMD_MAKE_DIR" command. This HAS TO BE DONE before letting the client download any files inside that directory.
Whatever text is between "START INFO" and "END INFO" will be printed when the user executes 'mad-dl info <package name'.
The "main.lua" and "conf.lua" files are not located in this folder. They are located in "../pkg_test/"(because we stated that with "LOCATION pkg_test". This could be replaced by "LOCATION pkg___PKG__), which is again located in the same folder that ".mad_dl" is in. It's name "pkg_test" because the package name is "test". If the package name was "ketchup", it would be named "pkg_ketchup". Inside this folder, you will find all of the neccesary files, in this case the files "main.lua" and "conf.lua", and a directory named "entities", which contains a file named "sheep.lua".
All of that will then be downloaded onto the clients computer, into a folder with the same name as the package.
This is what the repository folder looks like:
———————————————————————————————————————————————————————
Client changelog:
Spoiler
v2.1:
+Added config file support. See 'mad-dl help conf' for more info.
+Added support for package information support. See 'mad-dl help info'.
+Added 'search' command. See 'mad-dl help search'.
+Added 'list' command. See 'mad-dl help list'.
+Added 'rmrepo' command. See 'mad-dl help rmrepo'.
v2.0:
+Initial release.
Repository changelog:
Spoiler
v2.1:
+Added "info" tags. See the info for repository hosters for more information.
+Added "LOCATION" statement. See the info for repository hosters for more information.
v2.0:
+Initial release.
NOTE: If you encounter any errors, contact the repository administrator. The program expects PERFECT syntax in repository and package files.
For now, there is no way to "upload" packages to repositories, you will have to ask the repo admin to do that. An auto-packager will be relased when I get the time.
If any of this seems confusing, or you need help installing this to a server, just post a reply. Feedback would also be appreciated!