Why not use the upgrade functionality built into Mikrotik already. It will determine the correct version for you and download it from a 'upgrade server' (just another Mikrotik). All you have to do is make a scheduler that runs periodically to check for updates..
Here is mine..
/ system upgrade upgrade-package-source add address=1.2.3.4 user="update"
/ system script
add name="update_check" source="/ system upgrade refresh; :delay 00:00:05; / \
system upgrade download-all reboot-after-download=yes download-beta=no" \
policy=ftp,reboot,write,policy,test,winbox,password
/ system scheduler
add name="update_check" on-event=update_check start-date=Jan/01/1970 \
start-time=(03:00:00 + ([:tonum (0x . ([:pick [/int ethernet get [/int ethernet find name=ether1] mac-address] 13 14] . [:pick [/int ethernet get [/int ethernet find name=ether1] mac-address] 15 17]))] . s)) interval=7d comment="" disabled=no
Create user update on router 1.2.3.4 and put all of your new packages on that router.. The script and scheduled event will run every 7 days at 3:00am + ## seconds determined from the last 4 digits of the routers "ether1" interface..
-Gerard