Using the ruby โโfile (or any rake tool), I need to find out if the user running my script can execute some shell commands. In particular, g ++, etc. Hopefully system independent so if there is any g ++. Bat, g ++. Exe or just g ++ (etc.), it should say yes, however, as long as it is on the way and the executable is in the users system.
Example: if the user has an executable version of the file without the extension and the version of the .cmd file, he should say yes for the version without the extension on the linux system and yes for the version of .cmd on the Windows system. Since the user shell can only execute this version of the file.
The goal is to let the script configure itself (as much as possible).
Any suggestions on how I can do this?
source
share