Travis: Don't source files'

This commit is contained in:
Dylan Araps 2016-12-08 19:09:09 +11:00
parent 4d36341475
commit 5e76bf8f1c
2 changed files with 1 additions and 7 deletions

View file

@ -18,5 +18,5 @@ before_install:
script: script:
- time ./neofetch --ascii --config travis --ascii_distro travis -v - time ./neofetch --ascii --config travis --ascii_distro travis -v
- bash -c 'shellcheck neofetch' - shellcheck neofetch -e SC1090,SC2034

View file

@ -88,7 +88,6 @@ get_distro() {
else else
# Source the os-release file # Source the os-release file
for file in /etc/os-release /usr/lib/os-release /etc/*release /usr/lib/*release; do for file in /etc/os-release /usr/lib/os-release /etc/*release /usr/lib/*release; do
# shellcheck source=/etc/os-release
source "$file" && break source "$file" && break
done done
@ -2415,7 +2414,6 @@ info() {
# Use cache if it exists # Use cache if it exists
if [[ -f "${cache_dir}/neofetch/${2}" ]]; then if [[ -f "${cache_dir}/neofetch/${2}" ]]; then
# shellcheck source=/dev/null
source "${cache_dir}/neofetch/${2}" source "${cache_dir}/neofetch/${2}"
else else
# Call the function. # Call the function.
@ -2819,7 +2817,6 @@ get_default_config() {
travis_config="${script_dir}/config/travis" travis_config="${script_dir}/config/travis"
fi fi
# shellcheck source=config/config
if source "$default_config"; then if source "$default_config"; then
err "Config: Sourced default config. ($default_config)" err "Config: Sourced default config. ($default_config)"
else else
@ -2830,13 +2827,11 @@ get_default_config() {
get_user_config() { get_user_config() {
# Check $config_file # Check $config_file
if [[ -f "$config_file" ]]; then if [[ -f "$config_file" ]]; then
# shellcheck source=config/config
source "$config_file" source "$config_file"
err "Config: Sourced user config. ($config_file)" err "Config: Sourced user config. ($config_file)"
return return
elif [[ "$config_file" == "travis" ]]; then elif [[ "$config_file" == "travis" ]]; then
# shellcheck source=config/travis
source "$travis_config" source "$travis_config"
err "Config: Sourced user config. ($travis_config)" err "Config: Sourced user config. ($travis_config)"
return return
@ -2862,7 +2857,6 @@ get_user_config() {
cp "$script_dir/config/config" "$XDG_CONFIG_HOME/neofetch" cp "$script_dir/config/config" "$XDG_CONFIG_HOME/neofetch"
config_file="$XDG_CONFIG_HOME/neofetch/config" config_file="$XDG_CONFIG_HOME/neofetch/config"
fi fi
# shellcheck source=config/config
source "$config_file" source "$config_file"
err "Config: Sourced user config. ($config_file)" err "Config: Sourced user config. ($config_file)"
} }