-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_musikcube.sh
executable file
·42 lines (40 loc) · 1.15 KB
/
install_musikcube.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#to run this script go into the folder where it is then run: ./install_musikcube.sh
#
set -eu
#
folder_name="musikcuberepo"
#
if [ -d "/home/$USER/programs_setup/$folder_name" ]; then
cd /home/$USER/
rm -rf /home/$USER/programs_setup/$folder_name
fi
#
mkdir -p /home/$USER/programs_setup/$folder_name
cd /home/$USER/programs_setup/$folder_name
git clone https://github.com/clangen/musikcube.git --recursive
cd musikcube
cmake -G "Unix Makefiles" .
#
minnum=1
cpunum=$(expr $(nproc --all) - 1)
echo "number of cpus less one $cpunum"
usenum=1
if (( cpunum > minnum )); then
usenum=$cpunum
echo "using $usenum cpus."
else
echo "using only $usenum cpu."
fi
#
#make -j4 # Compile using 4 threads (change to your number of CPUs)
make -j$usenum
#
sudo make install
#musikcube
#
#cd /tmp
#wget https://github.com/clangen/musikcube/releases/download/0.94.0/musikcube_0.94.0_ubuntu_bionic_amd64.deb
#wget https://github.com$(wget https://github.com/clangen/musikcube/releases/latest -O - | egrep '/.*/.*/musikcube_[0-9,_.-]{1,20}_ubuntu_bionic_amd64.deb' -o) && sudo dpkg -i musikcube_*_amd64.deb
#rm musikcube_*_amd64.deb
#sudo apt-get install -f -y