Re: [mkgmap-dev] new option shutdown_pc ?

2017-04-02 Thread Marko Mäkelä

On Sun, Apr 02, 2017 at 09:47:18AM +0200, Thomas Morgenstern wrote:
maybee it is a good feature, to have the ability to shutdown the 
computer, after splitter and/or mkgmap is ready . But only , if 
splitter/mkgmap not ended with a error. I will read the error.


This would seem to be better done by a script that invokes splitter and 
mkgmap. All that splitter and mkgmap would need to do is to follow the 
convention, that is, finish with exit status 0 when everything succeeds, 
and with a nonzero exit status in case of an error.


Then, the script (or makefile or whatever) would implement the logic.  
Maybe sample scripts could be provided for both POSIX-like systems and 
for Microsoft Windows.


I do not know about the shells that are available on Microsoft Windows 
(cmd.exe, PowerShell and whatnot), but on POSIX, something like the 
following should work, assuming that splitter and mkgmap follow the 
convention on exit codes:


#!/bin/sh
set -e
# the above causes the script to abort on error
wget ...
java -jar splitter.jar ...
java -jar mkgmap.jar ...
# optional step: upload the map files to somewhere
sudo shutdown now

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] new option shutdown_pc ?

2017-04-02 Thread Thomas Morgenstern

Hi all,

maybee it is a good feature, to have the ability to shutdown the 
computer, after splitter and/or mkgmap is ready . But only , if 
splitter/mkgmap not ended with a error. I will read the error.


something like this : new option - shutdown_pcdefault=false

If shutdown_pc=true and splitter/mkgmap ended succesfull without error then

shutdown /s

else  do nothing
endif
 splitter and mkgmap have often a long runtime till late night
regards thomas
_

mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev