-
-
Save YogSottot/2ac643140eb5158af74e070ea7a19ca0 to your computer and use it in GitHub Desktop.
Revisions
-
eniac111 created this gist
Jan 6, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <[email protected]> wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return Blagovest Petrov # ---------------------------------------------------------------------------- # The script fixes the "no iKVM64 in java.library.path" bug with the SuperMicro # iKVM Java S**t. You can do an alias of it, like: "alias javaws=/usr/local/bin/launchikvm" if [ -f $1 ]; then Arch86Line=$(cat $1 | grep -n '<resources os="Linux" arch="x86_64">'|grep -o '^[0-9]*') Arch86Line=`expr $Arch86Line + 1` sed -i $Arch86Line'i\ <property name="jnlp.packEnabled" value="true"/>\n <property name="jnlp.versionEnabled" value="true"/>' `echo $1` ArchAmdLine=$(cat $1 | grep -n '<resources os="Linux" arch="amd64">'|grep -o '^[0-9]*') ArchAmdLine=`expr $ArchAmdLine + 1` sed -i $ArchAmdLine'i\ <property name="jnlp.packEnabled" value="true"/>\n <property name="jnlp.versionEnabled" value="true"/>' `echo $1` javaws $1 else echo "File $1 doesn't exist or is not a file!" >&2 echo "Usage: $0 [filename] (launch.jnlp)" >&2 fi