Fix linting errors

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2018-12-13 22:42:22 +01:00
parent fec74b795e
commit 8b3a294360
5 changed files with 25 additions and 30 deletions

View file

@ -2,7 +2,7 @@ image: ubuntu:latest
before_script: before_script:
- apt-get update && apt-get install -y --no-install-recommends shellcheck - apt-get update && apt-get install -y --no-install-recommends shellcheck
- alias shellcheck="shellcheck -x --exclude=SC2034,SC1091,SC1090"
Lint: Lint:
script: script:
- shellcheck -x --exclude=SC2034,SC1091 ./system/bin/* - shellcheck -x --exclude=SC2034,SC1091 ./system/bin/*

View file

@ -2,20 +2,20 @@
# #
# Author: Severin Kaderli <severin.kaderli@gmail.com> # Author: Severin Kaderli <severin.kaderli@gmail.com>
# We just source .bashrc so we don't need to manage two files. # We just source .bashrc so we don't need to manage two files.
if [[ -f $HOME/.bashrc ]]; then if [[ -f "${HOME}/.bashrc" ]]; then
. $HOME/.bashrc . "${HOME}/.bashrc"
fi fi
# Setting keyboard colors # Setting keyboard colors
if [[ -f $HOME/.keyleds ]]; then if [[ -f "${HOME}/.keyleds" ]]; then
. $HOME/.keyleds . "${HOME}/.keyleds"
fi fi
# Restore custom dconf configuration # Restore custom dconf configuration
cat "${HOME}/dconf/root.conf" | dconf load / dconf load / < "${HOME}/dconf/root.conf"
# Activate correct crontab file # Activate correct crontab file
crontab $HOME/.crontab crontab "${HOME}/.crontab"
# If we are on tty1 we start the x-server # If we are on tty1 we start the x-server
if [ "$(tty)" = "/dev/tty1" ]; then if [ "$(tty)" = "/dev/tty1" ]; then

View file

@ -6,34 +6,34 @@ shopt -s checkwinsize
shopt -s globstar shopt -s globstar
# set a fancy prompt (non-color, unless we know we "want" color) # set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in #case "$TERM" in
xterm|xterm-color|*-256color) color_prompt=yes;; # xterm|xterm-color|*-256color) color_prompt=yes;;
esac #esac
unset color_prompt force_color_prompt #unset color_prompt force_color_prompt
# Enable color support of ls # Enable color support of ls
if [ -f $HOME/.dircolors ]; then if [ -f "${HOME}/.dircolors" ]; then
dircolors -b $HOME/.dircolors > /dev/null 2>&1 dircolors -b "${HOME}/.dircolors" > /dev/null 2>&1
fi fi
# Sourcing alias definitions # Sourcing alias definitions
if [ -f $HOME/.aliases ]; then if [ -f "${HOME}/.aliases" ]; then
. $HOME/.aliases . "${HOME}/.aliases"
fi fi
# Source git-prompt script # Source git-prompt script
if [ -f /usr/share/git/completion/git-prompt.sh ]; then if [ -f "/usr/share/git/completion/git-prompt.sh" ]; then
. /usr/share/git/completion/git-prompt.sh . "/usr/share/git/completion/git-prompt.sh"
fi fi
# Enable autocompletion features # Enable autocompletion features
if [ -f /etc/bash_completion ]; then if [ -f "/etc/bash_completion" ]; then
/etc/bash_completion /etc/bash_completion
fi fi
complete -cf sudo complete -cf sudo
# Sourcing alias definitions # Sourcing alias definitions
if [ -f $HOME/.env ]; then if [ -f "${HOME}/.env" ]; then
. $HOME/.env . "${HOME}/.env"
fi fi

View file

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
. "${HOME}/bin/utils.sh"
# Bash # Bash
export HISTCONTROL=ignoreboth export HISTCONTROL=ignoreboth
@ -36,16 +38,9 @@ export npm_config_prefix="$HOME/.node_modules"
# Adding folders to the PATH variable # Adding folders to the PATH variable
export PATH="$PATH:$HOME/bin:$HOME/.node_modules/bin" export PATH="$PATH:$HOME/bin:$HOME/.node_modules/bin"
# Color codes for bash prompt
RESET='\033[0m'
GREEN='\033[32m'
RED='\033[31m'
BLUE='\033[34m'
YELLOW='\033[33m'
# Set bash prompt # Set bash prompt
set_bash_prompt() { set_bash_prompt() {
PS1="${Reset}┌─" PS1="${RESET}┌─"
PS1="${PS1}${RED}[\t]" PS1="${PS1}${RED}[\t]"
PS1="${PS1}${BLUE}[\h]" PS1="${PS1}${BLUE}[\h]"
PS1="${PS1}${YELLOW}[\w]" PS1="${PS1}${YELLOW}[\w]"

View file

@ -10,6 +10,6 @@ setxkbmap -model pc105 -layout ch
# Start ibus # Start ibus
ibus-daemon -drx ibus-daemon -drx
if [[ -f $HOME/.bash_profile ]]; then if [[ -f "${HOME}/.bash_profile" ]]; then
. $HOME/.bash_profile . "${HOME}/.bash_profile"
fi fi