Page 1 of 1

Jamtaba installer_script.sh

Posted: Thu Sep 21, 2017 7:15 am
by khz
@viewtopic.php?p=85443#p85443
If I read this correctly, the script assumes that it will install with "sudo".
What else has to go with it if you install it without "sudo", i. e. with "su"?
Where does it install itself, after "/opt"?
https://github.com/elieserdejesus/JamTa ... _script.sh

Code: Select all

#!/bin/bash

destDir=$(eval echo ~${SUDO_USER})/Jamtaba2

#create the directory and set permissions
install -d -m 0777 $destDir


echo "Installing Jamtaba 2 in " $destDir

#copy all files preserving attributes
cp -rp . $destDir


#change the _DEST_DIR placeholder text in Jamtaba2.desktop file
sed -i "s|_DEST_DIR|$destDir|" Jamtaba2.desktop

#copy the .desktop file to Desktop and Applications folder
cp Jamtaba2.desktop ~/Desktop/
cp Jamtaba2.desktop /usr/share/applications/


#copy the icon
cp Jamtaba2.png /usr/share/pixmaps/

#permissions
chmod 777 $destDir/Jamtaba2
chmod 777 $destDir/VstScanner
chmod 777 $destDir/uninstaller.sh
chmod 777 ~/Desktop/Jamtaba2.desktop
chmod 777 /usr/share/applications/Jamtaba2.desktop
chmod 777 /usr/share/pixmaps/Jamtaba2.png
THX

Re: Jamtaba installer_script.sh

Posted: Thu Sep 21, 2017 3:38 pm
by Lyberta
Looks like you can simply change the $destDir to whatever directory you want and it will copy files there.

Re: Jamtaba installer_script.sh

Posted: Fri Sep 22, 2017 8:00 am
by khz
@Lyberta THX \o/

How would you have to rewrite the script to make it automatic?
For "sudo" the rule already exists, now a rule for "su" has to be created.
So no matter how the user installs the program, it is always installed correctly and executable - without having to rewrite the installer_script. sh manually.
Example: I had installed Renoise with "su" and I could start it without any problems as a user. To uninstall it I switch to the "/home/foo/bar/Renoise" directory and run "Renoise # ./uninstaller. sh" script.
I also had "su" installed on Mixbus (Bitwig,...?) and I could start it without problems as a user. It installed itself in the "/opt" directory. To uninstall it I switch to the "/opt/Mixbus" directory and run "Mixbus # ./uninstaller. sh" script.
Fall down, maybe. any other inconsistencies in the script? Elieser, the developer ("... let's see if somebody in the linux forum can help. My linux skills are just the minimum") would be grateful to you IMHO.

Re: Jamtaba installer_script.sh

Posted: Fri Sep 22, 2017 7:40 pm
by Lyberta
I guess it's up to the user. I you have sudo, you do "sudo ./install.sh", if you don't have sudo, you simply use "su" and run the script afterwards as root.

Re: Jamtaba installer_script.sh

Posted: Sat Sep 23, 2017 7:59 am
by khz
With "su" to install I have done.
The result is that it installs itself after "/root", which I don't want.
See Terminal output:

Code: Select all

# ./Jamtaba2_Installer_64bits.run --target /opt
Creating directory /opt
Verifying archive integrity... 100% All good.
Uncompressing Jamtaba 2 Installer 100%
Installing Jamtaba 2 in /root/Jamtaba2
Also I cannot start the program as a user.

Code: Select all

~ $ /opt/Jamtaba2
/opt/Jamtaba2: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

Code: Select all

# emerge -1av libpng

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] media-libs/libpng-1.6.32:0/16::gentoo USE="apng (-neon) -static-libs" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] no
Ogrinal post:
http://ninbot.com/topic/jamtaba-2-relea ... ment-10723