22 lines
540 B
Bash
Executable file
22 lines
540 B
Bash
Executable file
#!/bin/bash
|
|
|
|
updfile=index.json # name of file to save list of packages as
|
|
updlsturl=https://content.minetest.net/api/packages/ # give use a json file of everything available
|
|
|
|
function get_updfile () {
|
|
wget -O $updfile $updlsturl
|
|
}
|
|
|
|
function check_mods () {
|
|
# we check the mods folder to see whats there then
|
|
return
|
|
}
|
|
|
|
if [[ -f "$updfile" ]]
|
|
then
|
|
# if the file is there move on unless the script is asked to update it
|
|
echo "Located packages file, using"
|
|
else
|
|
echo "File not found, fetching ..."
|
|
get_updfile
|
|
fi
|