Jamtaba installer_script.sh

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

User avatar
khz
Established Member
Posts: 1139
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Jamtaba installer_script.sh

Postby khz » Thu Sep 21, 2017 7:15 am

@https://linuxmusicians.com/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/JamTaba/blob/master/installers/linux/installer_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
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.

Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet

Re: Jamtaba installer_script.sh

Postby Lyberta » Thu Sep 21, 2017 3:38 pm

Looks like you can simply change the $destDir to whatever directory you want and it will copy files there.

User avatar
khz
Established Member
Posts: 1139
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Re: Jamtaba installer_script.sh

Postby khz » Fri Sep 22, 2017 8:00 am

@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.
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.

Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet

Re: Jamtaba installer_script.sh

Postby Lyberta » Fri Sep 22, 2017 7:40 pm

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.

User avatar
khz
Established Member
Posts: 1139
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Re: Jamtaba installer_script.sh

Postby khz » Sat Sep 23, 2017 7:59 am

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-released#comment-10723
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 1 guest