33 lines
952 B
Bash
33 lines
952 B
Bash
# Alerts, for when user needs to read something.
|
|
alert() {
|
|
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t
|
|
echo
|
|
read -rp "Press enter to continue." continue
|
|
}
|
|
|
|
check_requirements() {
|
|
# Make sure the minimum of curl, sox, wine, and winetricks are installed or fex-emu on aarch64
|
|
if [[ "$(uname -m)" == "aarch64" ]]; then
|
|
minimumDependencies=("FEXLoader")
|
|
wine="FEXLoader -- /usr/bin/wine"
|
|
else
|
|
minimumDependencies=("curl" "sox" "wine")
|
|
fi
|
|
for i in "${minimumDependencies[@]}" ; do
|
|
if ! command -v $i &> /dev/null ; then
|
|
echo "Please install $i before continuing."
|
|
return 1
|
|
fi
|
|
done
|
|
return 0
|
|
}
|
|
|
|
# Function to open urls across OS.
|
|
open_url() {
|
|
if [[ "$(uname)" == "Darwin" ]]; then
|
|
open "${*}" 2> /dev/null
|
|
else
|
|
xdg-open "${*}" 2> /dev/null
|
|
fi
|
|
}
|