Update install.sh

This commit is contained in:
Geoffrey McClinsey 2017-04-03 21:55:50 -04:00 committed by GitHub
parent 0b98b99b82
commit 2ede01cfc9

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/usr/bin/env bash
function _fetch_sources() { function _fetch_sources() {
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip wget -O /tmp/nanorc.zip https://github.com/gmcclins/nanorc/archive/master.zip
if [ ! -d ~/.nano/ ] if [ ! -d ~/.nano/ ]
then then
mkdir ~/.nano/ mkdir ~/.nano/
@ -10,8 +10,7 @@ function _fetch_sources() {
cd ~/.nano/ cd ~/.nano/
unzip -o "/tmp/nanorc.zip" unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./ mv nanorc-master/ ~/.nano/nanorc/
rm -rf nanorc-master
rm /tmp/nanorc.zip rm /tmp/nanorc.zip
} }
@ -21,12 +20,12 @@ function _update_nanorc() {
touch ~/.nanorc touch ~/.nanorc
fi fi
# add all includes from ~/.nano/nanorc if they're not already there # add all includes from ~/.nano/nanorc/nanorc if they're not already there
while read inc; do while read 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/nanorc
} }
function _update_nanorc_lite() { function _update_nanorc_lite() {