mikshaw


Group: Members
Posts: 4856
Joined: July 2004 |
 |
Posted: May 02 2008,13:28 |
 |
^thehatsrule^: That's brilliant! It took a few tries to get the syntax right, but it works using unset DISPLAY and sh -c
If you weren't so ugly I'd give you a hug =o)
Code Sample | function dlonly() if myfile then local dirname=fltk.fl_dir_chooser("Save to...",nil,nil) if dirname and fltk.fl_filename_isdir(dirname)~=0 then Fl:check() os.execute(terminal..[[ -title "Downloading ]].. myfile.title..[[" -e sh -c "unset DISPLAY && cd ]]..dirname.. [[ && wget ]]..mirror..myfile.location..[[/]]..myfile.title.. [[{.info,.md5.txt,}]]..[[ && md5sum -c ]]..myfile.title.. [[.md5.txt && echo Press \"Enter\" to continue && read"]]) end end end
|
Still need to test some more, and probably reconsider using && for every command (want to keep the term open regardless of failure)
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|