jajuk-team / jajuk

Advanded jukebox for users with large or scattered music collections
49 stars 19 forks source link

Jajuk RPM doesn't work under Fedora 27 #2018

Open bflorat opened 6 years ago

bflorat commented 6 years ago

After official Jajuk RPM installation, Jajuk crashes with this message :

/bin/jajuk: line 43: cd: /home/bflorat/prog//bin/bin: No such file or directory
Detected a 64-bit operating system, using the lib64 native library directory.
Java version in the default path is: 1.8
java -client -Xms20M -Xmx2G -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -Xverify:none -Djava.library.path=/usr/lib/jni:/usr/lib:/usr/share/jajuk/lib64:/home/bflorat/prog//bin/bin/../lib/lib64 -jar jajuk.jar -notest
Error: Unable to access jarfile jajuk.jar

The problem is in the path detection when /bin is a symlink to /usr/bin , to fix, replace /usr/bin/jajuk by /bin

if [ "**/usr/bin/jajuk**" = "$0" ] && [ -e /usr/share/jajuk/bin/jajuk.jar ] ; then
    JAJUK_HOME="/usr/share/jajuk/bin"
    cd /usr/share/jajuk/bin
else
    JAJUK_HOME=$(pwd)/`dirname "$0"`/bin
    cd "$JAJUK_HOME"
fi