-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·42 lines (37 loc) · 1.23 KB
/
install.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
#!/usr/bin/env bash
# ToDo
#
# Add BSD, SuSE options etc
# Check if sox is available already
if [[ -x "$(command -v sox)" ]]; then
echo "SoX is already installed."
sox_installed="True"
else
sox_installed="False"
fi
# Install sox is not already present
if [[ $sox_installed = "False" ]]; then
echo "This script will issue a sudo call to install SoX."
echo "If you wish to keep it portable then maybe just install it yourself."
echo -n "Would you like to continue? Y/n "
read answer
if [[ $answer == "y" || $answer == "Y" ]]; then
# Check for different versions of Linux
if [[ -x "$(command -v pacman)" ]]; then
echo "Installing for arch"
sudo pacman -S sox
elif [[ -x "$(command -v apt)" ]]; then
echo "Debian/Ubuntu"
sudo apt install sox
fi
else
# Exits if the user did not say yes
exit
fi
fi
# Copy soxnoise.py to /usr/bin
echo -n "The next step is to install soxnoise to /usr/bin. Would you like to continue? "
read answer
if [[ answer == "y" || answer == "Y" ]]; then
sudo cp soxnoise /usr/bin/soxnoise
fi