Skip to content

Commit

Permalink
Merge pull request scopatz#163 from gmcclins/travis
Browse files Browse the repository at this point in the history
travis-ci shellcheck test
  • Loading branch information
scopatz committed Mar 20, 2018
2 parents 334332d + 211ef14 commit 2833921
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sudo: required
dist: trusty

before_install:
- echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list
- sudo apt-get -qq update
- sudo apt-get install -y shellcheck

git:
depth: 3

script: ./shellcheck.sh
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _fetch_sources(){
mkdir ~/.nano/
fi

cd ~/.nano/
cd ~/.nano/ || exit

unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./
Expand All @@ -22,9 +22,9 @@ _update_nanorc(){
fi

# add all includes from ~/.nano/nanorc if they're not already there
while read inc; do
while read -r inc; do
if ! grep -q "$inc" "${NANORC_FILE}"; then
echo "$inc" >> $NANORC_FILE
echo "$inc" >> "$NANORC_FILE"
fi
done < ~/.nano/nanorc
}
Expand Down
4 changes: 4 additions & 0 deletions shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -ev
# Shellcheck the script

shellcheck install.sh

0 comments on commit 2833921

Please sign in to comment.