diff --git a/bash/main.sh b/bash/main.sh index 7df12eb..01b2691 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -5,31 +5,31 @@ MAIN_BASH_FILE="$(realpath "${BASH_SOURCE[0]}")" MAIN_BASH_ROOT="$(dirname "${MAIN_BASH_FILE}")" main_link_bashrc() { - local file="/etc/bash.bashrc" - rm --force "${file}" - ln --symbolic "${MAIN_BASH_FILE}" "${file}" + local file="/etc/bash.bashrc" + rm --force "${file}" + ln --symbolic "${MAIN_BASH_FILE}" "${file}" } # import modules main_import_modules() { -local file="${1}" -if [ -f "${file}" ] ; then - local path="$(realpath "${file}")" - local root="$(dirname "${path}")" - local IFS=$'\n' - local modules=($(find "${root}" -type "f" -name "*.sh" | sort)) - local module - for module in "${modules[@]}" ; do - if [ "${module}" != "${path}" ] ; then - . "${module}" - fi - done - log_trace "${modules[@]}" - return 0 -else - log_fatal "No file: ${file}" - return 1 -fi + local file="${1}" + if [ -f "${file}" ] ; then + local path="$(realpath "${file}")" + local root="$(dirname "${path}")" + local IFS=$'\n' + local modules=($(find "${root}" -type "f" -name "*.sh" | sort)) + local module + for module in "${modules[@]}" ; do + if [ "${module}" != "${path}" ] ; then + . "${module}" + fi + done + log_trace "${modules[@]}" + return 0 + else + log_fatal "No file: ${file}" + return 1 + fi } # import modules diff --git a/bash/proxy.sh b/bash/proxy.sh index 02ee28a..0ccc891 100644 --- a/bash/proxy.sh +++ b/bash/proxy.sh @@ -1,8 +1,8 @@ socks() { - local value - case "${1}" in - "on") value="manual" ;; - *) value="none" ;; - esac - gsettings set "org.gnome.system.proxy" "mode" "${value}" + local value + case "${1}" in + "on") value="manual" ;; + *) value="none" ;; + esac + gsettings set "org.gnome.system.proxy" "mode" "${value}" }