Ruby Script Runner for Ubuntu Gedit

Posted by Ygam on Ask Ubuntu See other posts from Ask Ubuntu or by Ygam
Published on 2011-02-21T06:21:08Z Indexed on 2011/02/21 7:32 UTC
Read the original article Hit count: 316

Filed under:

I have this Java script runner installed in my gedit external tools:

#!/bin/sh
cd $GEDIT_CURRENT_DOCUMENT_DIR
if javac $GEDIT_CURRENT_DOCUMENT_NAME;
then
java ${GEDIT_CURRENT_DOCUMENT_NAME%\.java}
else
echo "Failed to compile"
fi

I tried modifying to it to something like this

#!/bin/sh
cd $GEDIT_CURRENT_DOCUMENT_DIR
ruby ${GEDIT_CURRENT_DOCUMENT_NAME%\.rb}

but it doesn't work. I may have missed something, I don't know what because I don't do bash scripting. Hehe

© Ask Ubuntu or respective owner

Related posts about gedit