1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-25 18:05:39 +01:00

Merge pull request #163 from gmcclins/travis

travis-ci shellcheck test
This commit is contained in:
Anthony Scopatz 2018-03-20 15:53:09 -04:00 committed by GitHub
commit 2833921a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

12
.travis.yml Normal file
View File

@ -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

View File

@ -7,7 +7,7 @@ _fetch_sources(){
mkdir ~/.nano/ mkdir ~/.nano/
fi fi
cd ~/.nano/ cd ~/.nano/ || exit
unzip -o "/tmp/nanorc.zip" unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./ mv nanorc-master/* ./
@ -22,9 +22,9 @@ _update_nanorc(){
fi fi
# add all includes from ~/.nano/nanorc if they're not already there # 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 if ! grep -q "$inc" "${NANORC_FILE}"; then
echo "$inc" >> $NANORC_FILE echo "$inc" >> "$NANORC_FILE"
fi fi
done < ~/.nano/nanorc done < ~/.nano/nanorc
} }

4
shellcheck.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh -ev
# Shellcheck the script
shellcheck install.sh