diff --git a/installJRMC b/installJRMC index 13243eb..8495fa0 100755 --- a/installJRMC +++ b/installJRMC @@ -40,6 +40,8 @@ installJRMC () { _printHelpAndExit () { + _runDebug "${FUNCNAME[0]}" + cat <<-'EOF' USAGE: installJRMC [[OPTION] [VALUE]]... @@ -103,6 +105,8 @@ EOF _parseInput () { + _runDebug "${FUNCNAME[0]}" + if _input=$(getopt -o +vdhu -l rpmbuild,outputdir:,mcversion:,restorefile:,betapass:,service:,version,debug,help,uninstall,createrepo,createrepo-webroot:,createrepo-user:,vncpass:,display: -- "$@"); then eval set -- "$_input" while true; do @@ -168,8 +172,16 @@ EOF } + _runDebug () { + + [[ -n $_debug ]] && echo "Running: " "$@" + } + + _checkUser () { + _runDebug "${FUNCNAME[0]}" + if [[ "$_user" == "root" ]]; then cat < $_service_fname @@ -728,6 +780,8 @@ EOF" _serviceX11VNC () { + _runDebug "${FUNCNAME[0]}" + _installPackage x11vnc _setVNCPass @@ -761,6 +815,8 @@ EOF" _serviceCreaterepo () { + _runDebug "${FUNCNAME[0]}" + _generateServiceVars "jriver-createrepo" "${_bash_cmd[@]}" "cat <<-EOF > $_service_fname @@ -791,6 +847,8 @@ EOF" _uninstall () { + _runDebug "${FUNCNAME[0]}" + read -r -p "Do you really want to uninstall all JRiver Media Center files? [y/N] " _response _response=${_response,,} # tolower [[ ! "$_response" =~ ^(yes|y)$ ]] && echo "Cancelling uninstall..." && exit 0 @@ -857,6 +915,8 @@ EOF" # Install external repos _installExternalRepos + echo "RPMBUILD: " $_rpmbuild + # install MC using package manager (default) if [[ -z $_rpmbuild ]]; then _installRepo