Something went wrong. Try again.
Mirroring: https://github.com/MunifTanjim/scripts.sh
Something went wrong. Try again.
scripts.sh setup-cmus
897 B · 35 lines
at main
123456789101112131415161718192021222324252627282930313233343536#!/usr/bin/env bash
# House Keeping_GIT_DIR="${HOME}/data/gits"mkdir -p "${_GIT_DIR}"cd "${_GIT_DIR}"
# Initializationif [[ -d "${_GIT_DIR}/cmus" ]]; then echo "cmus is already installed!" echo "Updating cmus..." cd cmus git pullelse echo "Installing cmus..." git clone --depth 1 https://github.com/cmus/cmus cd cmusfi
echo "Installing dependencies..."sudo apt install -y libroar-dev libsamplerate0-dev libjack-dev libavformat-dev libavcodec-dev libsystemd-dev libopusfile-dev libasound2-dev libncurses5-dev libncursesw5-dev
echo "Running build..."./configure prefix=${HOME}/.localmakemake install
echo "Setting up cmus binary: cmus, cmus-remote"sudo ln -nsf ${HOME}/.local/bin/cmus /usr/bin/cmussudo ln -nsf ${HOME}/.local/bin/cmus-remote /usr/bin/cmus-remote
echo "Setting up helper scripts..."sudo ln -nsf `which cmus-toggle` /usr/bin/cmus-toggle
echo "Done!"