I tryed to add an array -> read filenames and after them download this file. Also i added 2 names as ignor list (works), but if i want to download the files in an while loop i get this error:
curl: (3) URL using bad/illegal format or missing URL
My code try:
plugins=()
for filename in $(ls $HOME/serverfiles/oxide/plugins/)
do
plugins+=($filename)
done;
count=0
while [ "x${plugins[count]}" != "x" ]
do
if [ “${plugins[count]}” = “CupboardLimitNotifier.cs” ]
then
count=$(( $count + 1 ))
elif [ “${plugins[count]}” = “ChatResponder.cs” ]
then
count=$(( $count + 1 ))
else
curl https://umod.org/plugins/${plugins[count]} -o ${plugins[count]}
count=$(( $count + 1 ))
fi
done
If i put echo instead of curl i get the right URL for it (without -o)...
https://umod.org/plugins/AdminRadar.cs
https://umod.org/plugins/EntityOwner.cs
My intend: Its not possible to fetch any versions data on umod.org. So i download after new version of main plugin the core system update. After them automaticly the plugins will be downloaded and overwritten.