From bb72eb10b6c7148ad3107c50a4232dea080d1468 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 25 Feb 2021 13:21:50 +0100 Subject: Added travis CI, fixing shellcheck errors --- .travis.yml | 4 ++++ README.md | 2 +- config/qutebrowser/config.py | 3 ++- config/x11/xinitrc | 2 +- install | 11 ++++++----- local/bin/music-dl.conf | 9 --------- local/bin/repo-client | 3 ++- music-dl.conf | 9 +++++++++ test | 5 +++++ 9 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 .travis.yml delete mode 100644 local/bin/music-dl.conf create mode 100644 music-dl.conf create mode 100755 test diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3aee491 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: shell + +script: + - ./test diff --git a/README.md b/README.md index d1ee98a..01169da 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Dotfiles +# dotfiles [![Build Status](https://api.travis-ci.com/cacharle/dotfiles.svg?branch=master)](https://travis-ci.com/cacharle/dotfiles) ## Installation diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index 83d7ae7..d449658 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -31,7 +31,8 @@ c.url.searchengines = { 'gh': 'https://github.com/search?q={}', 'h': 'https://hoogle.haskell.org/?hoogle={}', 'cpp': 'http://cplusplus.com/search.do?q={}', - 'lar': 'https://www.larousse.fr/dictionnaires/francais/{}' + 'lar': 'https://www.larousse.fr/dictionnaires/francais/{}', + 'pypi': 'https://pypi.org/search/?q={}', } c.fonts.default_family = 'Fira Mono' diff --git a/config/x11/xinitrc b/config/x11/xinitrc index 2dbe77a..90d8515 100755 --- a/config/x11/xinitrc +++ b/config/x11/xinitrc @@ -7,7 +7,7 @@ redshift -c $XDG_CONFIG_HOME/redshift/redshift.conf & echo 'Starting dunst' dunst & xset r rate 200 50 -pulseaudio --daemonize +pulseaudio -D case "$(cat /etc/hostname)" in cacharle-main) diff --git a/install b/install index 86d4f1a..b040ed9 100755 --- a/install +++ b/install @@ -16,8 +16,8 @@ link_home_files() { sed -e 'p' -e 's:^'"$rice_dir"':'"$dest_dir"':' | awk '{ if (NR % 2 == 1) { print "'"$(pwd)"'" "/" $0 } else print }' | xargs -L 2 > "$paths" - cat $paths | cut -d ' ' -f 2 | xargs -L 1 dirname | xargs -L 1 mkdir -pv - cat $paths | xargs -L 1 ln -svf + < "$paths" cut -d ' ' -f 2 | xargs -L 1 dirname | xargs -L 1 mkdir -pv + < "$paths" xargs -L 1 ln -svf } link_home_files 'config' "$XDG_CONFIG_HOME" @@ -53,9 +53,10 @@ update_zsh_plugin() { url="$1" path="$XDG_DATA_HOME/zsh/$(basename "$url")" - ([ ! -d "$path" ] || [ -z "$(ls -A "$path")" ]) && - git clone "$url" "$path" || - git -C "$path" pull + if [ ! -d "$path" ] || [ -z "$(ls -A "$path")" ] + then git clone "$url" "$path" + else git -C "$path" pull + fi } mkdir -p "$XDG_DATA_HOME/zsh" diff --git a/local/bin/music-dl.conf b/local/bin/music-dl.conf deleted file mode 100644 index e865370..0000000 --- a/local/bin/music-dl.conf +++ /dev/null @@ -1,9 +0,0 @@ -bonjour=foo -aurevoir=lala -auasdf - -asdf -asd -fa -sdf -asd diff --git a/local/bin/repo-client b/local/bin/repo-client index 49049d8..de9b9f0 100755 --- a/local/bin/repo-client +++ b/local/bin/repo-client @@ -1,3 +1,4 @@ #!/bin/sh -ssh git@cacharle.xyz repo $* +# shellcheck disable=SC2029 +ssh git@cacharle.xyz repo "$@" diff --git a/music-dl.conf b/music-dl.conf new file mode 100644 index 0000000..e865370 --- /dev/null +++ b/music-dl.conf @@ -0,0 +1,9 @@ +bonjour=foo +aurevoir=lala +auasdf + +asdf +asd +fa +sdf +asd diff --git a/test b/test new file mode 100755 index 0000000..42ec255 --- /dev/null +++ b/test @@ -0,0 +1,5 @@ +#!/bin/sh + +shellcheck install +shellcheck test +shellcheck local/bin/* -- cgit